function returnArray(): array { return array('one', 'two'); } function acceptArray(: void) { # Note the use of list here. list($a, $b) = returnArray(); print "a=$a\n"; print "b=$b\n"; }
Programming Tips - PHP: the best way to accept an array from a function
Date: 2008may16
Language: php
Q. PHP: the best way to accept an array from a function
A. Use list(), like this: