note 24790 modified in language.types.array by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Wed, 28 Aug 2002 21:47:36 +0000 |
| Subject: | note 24790 modified in language.types.array by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-35942@lists.php.net to get a copy of this message | ||
[Editor's note: Use of array_values will also do this, e.g.
$array = array_values($array);]
An easier way to re-index an array after unsetting an element is:
$array=array_reverse(array_reverse($array));
Much easier on the eyes than the above method!
--was--
An easier way to re-index an array after unsetting an element is:
$array=array_reverse(array_reverse($array));
Much easier on the eyes than the above method!
http://www.php.net/manual/en/language.types.array.php