note 13926 added to function.array-unique.php
| From: | az at top-webdesign dot de | Date: | Tue, 10 Jul 2001 16:38:23 +0000 |
| Subject: | note 13926 added to function.array-unique.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15166@lists.php.net to get a copy of this message | ||
@lefeuvrenicolas
Use the above mentioned combination with "array_values" - then it works.
So do it like this:
--------------------
$truc = array("l810u00","l810u00","l810q00");
$machin = array_values(array_unique($truc));
for($i=0;$i < count($machin) ; $i++){
echo $machin[$i]."\n";
}
--------------------
But it is strange anyway ...
http://www.php.net/manual/en/function.array-unique.php