note 17468 added to function.array-unique

From: Date: Mon, 10 Dec 2001 16:06:23 +0000
Subject: note 17468 added to function.array-unique
Groups: php.notes 
Request: Send a blank email to php-notes+get-22440@lists.php.net to get a copy of this message
My function that equals the broken array_unique(): function my_unique_array($array){ if(!is_array($array)){ return false; } foreach($array as $key => $value){ $tmp_array[$value] = ""; } foreach($tmp_array as $key => $value){ $new_array[] = $key; } return $new_array; } -- http://www.php.net/manual/en/function.array-unique.php http://master.php.net/manage/user-notes.php?action=edit+17468 http://master.php.net/manage/user-notes.php?action=delete+17468 http://master.php.net/manage/user-notes.php?action=reject+17468

« previous php.notes (#22440) next »