Re: Retrieving function values
| From: | Tamara Temple | Date: | Mon, 15 Nov 2010 04:12:10 +0000 |
| Subject: | Re: Retrieving function values | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-309491@lists.php.net to get a copy of this message | ||
On Nov 14, 2010, at 9:12 PM, Ron Piggott wrote:
I am writing a custom function and I need to be able to retrieve 3 values from it.To return multiple values, you have to return an array: return array($var1, $var2, $var3); Then at the calling site, you retrieve them with a list construct: list ($var1, $var2, $var3) = function_returning_array($param);