note 69779 deleted from ref.array by felipe
| From: | felipe@php.net | Date: | Sun, 30 Dec 2007 19:26:48 +0000 |
| Subject: | note 69779 deleted from ref.array by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134513@lists.php.net to get a copy of this message | ||
Note Submitter: kthejoker - google mail
----
re jeremyquintion:
your solution is array_merge(), which will reindex a numeric array.
So if you have
$array[0] = "something";
$array[1] = "something else";
$array[2] = "yet another";
unset($array[1]);
array_merge($array);
the result is
$array[0] = "something";
$array[1] = "yet another";
and then you can use a for loop accordingly. Obviously this isn't ideal if you want to maintain
key association.