note 78607 added to function.array-unique
| From: | cz12 at osu1 dot php dot net | Date: | Thu, 18 Oct 2007 21:17:55 +0000 |
| Subject: | note 78607 added to function.array-unique | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131518@lists.php.net to get a copy of this message | ||
A simple way of checking for duplicates in an array (as opposed to removing them outright):
if (array_unique($array) != $array)
{
echo "Duplicate found in array.";
}
----
Server IP: 217.160.72.57
Probable Submitter: 170.140.100.150
----
Manual Page -- http://www.php.net/manual/en/function.array-unique.php
Edit -- https://master.php.net/note/edit/78607
Del: integrated -- https://master.php.net/note/delete/78607/integrated
Del: useless -- https://master.php.net/note/delete/78607/useless
Del: bad code -- https://master.php.net/note/delete/78607/bad+code
Del: spam -- https://master.php.net/note/delete/78607/spam
Del: non-english -- https://master.php.net/note/delete/78607/non-english
Del: in docs -- https://master.php.net/note/delete/78607/in+docs
Del: other reasons-- https://master.php.net/note/delete/78607
Reject -- https://master.php.net/note/reject/78607
Search -- https://master.php.net/manage/user-notes.php