note 13571 deleted from function.array by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 20:55:09 +0000 |
| Subject: | note 13571 deleted from function.array by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25433@lists.php.net to get a copy of this message | ||
[Editor's Note: Use
list ($single_var) = myarrayfunc();
list (,,,$single_var2) = myarrayfunc();
--jag@php.net]
I come from a perl background, and in perl there is a way to get only one element from a function
that returns an array. example (in perl):
$single_var = (myarrayfunc())[0] or
$single_var2 = (myarrayfunc())[3] etc...
Is there something like this in PHP?
Thanks.