note 51607 added to function.array-unique
| From: | Ric at osu1 dot php dot net | Date: | Tue, 05 Apr 2005 16:44:25 +0000 |
| Subject: | note 51607 added to function.array-unique | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-87510@lists.php.net to get a copy of this message | ||
A very simple way of getting rid of duplicate entries and re-indexing with key starting at 0:
$temp=array_unique($main);
$main=array_values($temp);
----
Manual Page -- http://www.php.net/manual/en/function.array-unique.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51607
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51607&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51607&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51607&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51607&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51607&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51607&report=yes
Search -- http://master.php.net/manage/user-notes.php