Re: Support negative indexes for arrays and strings
| From: | Sherif Ramadan | Date: | Sat, 01 Sep 2012 09:23:00 +0000 |
| Subject: | Re: Support negative indexes for arrays and strings | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-62624@lists.php.net to get a copy of this message | ||
>
> $array[0] = 'first element';
> $array[99999] = 'second element';
> var_dump($array);
> /*
> array(2) {
> [99999]=>
> string(14) "second element"
> [0]=>
> string(13) "first element"
> }
> */
Just correcting this as it was a copy/paste fail... The above code
would produce:
array(2) {
[0]=>
string(13) "first element"
[99999]=>
string(14) "second element"
}