note 69779 added to ref.array
| From: | kthejoker-googlemail at osu1 dot php dot net | Date: | Wed, 20 Sep 2006 17:00:28 +0000 |
| Subject: | note 69779 added to ref.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-117356@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 66.163.161.117
Probable Submitter: 168.39.166.127
----
Manual Page -- http://www.php.net/manual/en/ref.array.php
Edit -- https://master.php.net/note/edit/69779
Del: integrated -- https://master.php.net/note/delete/69779/integrated
Del: useless -- https://master.php.net/note/delete/69779/useless
Del: bad code -- https://master.php.net/note/delete/69779/bad+code
Del: spam -- https://master.php.net/note/delete/69779/spam
Del: non-english -- https://master.php.net/note/delete/69779/non-english
Del: in docs -- https://master.php.net/note/delete/69779/in+docs
Del: other reasons-- https://master.php.net/note/delete/69779
Reject -- https://master.php.net/note/reject/69779
Search -- https://master.php.net/manage/user-notes.php