note 17467 deleted from control-structures.foreach by jimw
| From: | jimw@php.net | Date: | Mon, 17 Dec 2001 03:35:17 +0000 |
| Subject: | note 17467 deleted from control-structures.foreach by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22958@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;
}