note 74471 added to function.array-unique
| From: | danny at lostsockdesign dot com dot au | Date: | Fri, 13 Apr 2007 01:44:29 +0000 |
| Subject: | note 74471 added to function.array-unique | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-125346@lists.php.net to get a copy of this message | ||
An updated version of webcreators script that fixes a notice error about an undefined index and
removes blank array value.
function my_array_unique($from) {
for ($i=count($from)-1;$i>1;$i--) {
$last = $from[$i];
$from[$i] = false;
if (!in_array($last,$from)) {
$from[$i]=$last;
}
}
$from = array_unique($from);
$from = array_slice($from,0,count($from)-1);
return $from;
}
----
Server IP: 69.147.83.197
Probable Submitter: 58.109.95.244
----
Manual Page -- http://www.php.net/manual/en/function.array-unique.php
Edit -- https://master.php.net/note/edit/74471
Del: integrated -- https://master.php.net/note/delete/74471/integrated
Del: useless -- https://master.php.net/note/delete/74471/useless
Del: bad code -- https://master.php.net/note/delete/74471/bad+code
Del: spam -- https://master.php.net/note/delete/74471/spam
Del: non-english -- https://master.php.net/note/delete/74471/non-english
Del: in docs -- https://master.php.net/note/delete/74471/in+docs
Del: other reasons-- https://master.php.net/note/delete/74471
Reject -- https://master.php.net/note/reject/74471
Search -- https://master.php.net/manage/user-notes.php