我有一个PHP函数返回一些东西:
function myfunction() {
$array = array('one', 'two', 'three', 'four');
foreach($array as $i) {
echo $i;
}
}
Run Code Online (Sandbox Code Playgroud)
另一个函数,我想从上面的函数传递返回值:
function myfunction2() {
//how to send myfunction()'s output here? I mean:
//echo 'onetwothreefour';
return 'something additional';
}
Run Code Online (Sandbox Code Playgroud)
我想它会看起来像,myfunction2(myfunction)但我不太了解PHP,我无法使它工作.