note 17467 added to control-structures.foreach
| From: | tvaroha at jsc dot cz | Date: | Mon, 10 Dec 2001 16:04:30 +0000 |
| Subject: | note 17467 added to control-structures.foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-22439@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/control-structures.foreach.php
http://master.php.net/manage/user-notes.php?action=edit+17467
http://master.php.net/manage/user-notes.php?action=delete+17467
http://master.php.net/manage/user-notes.php?action=reject+17467