[PHP] Re: Returning TWO variables from function
Can someone let me know how to return TWO variables from a function Try http://www.php.net/manual/en/language.references.php
[PHP] Re: Returning TWO variables from function
The function can return an array that include two or more variables. Nadim Attari [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Can someone let me know how to return TWO variables from a function Try http://www.php.net/manual/en/language.references.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Returning TWO variables from function
Roy W [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Can someone let me know how to return TWO variables from a function I tried: return $var1, $var2; But I get parse errors and other errors. function ReturnMultiValues($a, $b, $c, $d) { return array($a, $b, $c, $d); } list($first, $second, $third, $fourth) = ReturnMultiValues(1, 2, 3, 4); -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L+$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R+ tv b DI+++ D-(++) G+ e(++) h-- r- y+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php