note 8297 deleted from function.array-unique by felipe

From: Date: Sat, 29 Dec 2007 18:36:27 +0000
Subject: note 8297 deleted from function.array-unique by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134165@lists.php.net to get a copy of this message
Note Submitter: sterba at locksley-west dot com ---- Maybe this will come handy for PHP3 users: <?php for ($a = 0; $a < $arraylength; $a++){ if (($a > 0)&&($array[$a] <> $array[$a-1])) $uniquearray[$a] = $array[$a]; $a++; } ?> You can even skip the $a>0 test, I believe... not bulletproof, but much shorter.

« previous php.notes (#134165) next »