note 28375 deleted from function.array-unique by danbrown

From: Date: Sun, 23 Jan 2011 17:25:55 +0000
Subject: note 28375 deleted from function.array-unique by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176202@lists.php.net to get a copy of this message
Note Submitter: juggler at webworkerinfo dot de ---- in addition to bisqwit: in some cases you can simply use serialize instead of recursivemakehash(). <?php function array_unique2($input) { $tmp = array(); foreach($input as $a => $b) $tmp[$a] = serialize($b); $newinput = array(); foreach(array_unique($tmp) as $a => $b) $newinput[$a] = $input[$a]; return $newinput; } ?> Have fun Juggler

« previous php.notes (#176202) next »