functions
Posted: Tue Jan 20, 2004 5:29 pm
any one got any ideas of creating a function that returns multiple variables/values??
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
function foo(){
$val1 = 'hello';
$val2 = 'goodbye';
return array($val1, $val2);
}
list($val1, $val2) = foo();