note 13926 deleted from function.array-unique by felipe

From: Date: Sat, 29 Dec 2007 21:41:26 +0000
Subject: note 13926 deleted from function.array-unique by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134248@lists.php.net to get a copy of this message
Note Submitter: az at top-webdesign dot de ---- @lefeuvrenicolas Use the above mentioned combination with "array_values" - then it works. So do it like this: -------------------- <?php $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 ...

« previous php.notes (#134248) next »