note 83271 deleted from function.array by felipe
| From: | felipe@php.net | Date: | Mon, 19 May 2008 12:38:13 +0000 |
| Subject: | note 83271 deleted from function.array by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-139521@lists.php.net to get a copy of this message | ||
Note Submitter: rvw at cosninix dot com
----
For some reason php does not allow this:
$vv=array("one","two","three")[$i];
Now you need to do:
$extravar = array("one","two","three");
$vv=$extravar[$i];
which is ugly.
This seems to be a flaw in the php language design.