note 110447 deleted from function.array-fill by googleguy
| From: | googleguy@php.net | Date: | Tue, 23 Oct 2012 12:01:57 +0000 |
| Subject: | note 110447 deleted from function.array-fill by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191496@lists.php.net to get a copy of this message | ||
Note Submitter: chris dot barr at ntlworld dot com
----
Contrary to fat-lip below - the example given in the docs is correct regarding negative starting
indices, it only affects the first key:
<?php
$b = array_fill(-2, 4, 'pear');
print_r($b);
/* Will output:
Array
(
[-2] => pear
[0] => pear
[1] => pear
[2] => pear
)
*/