note 6561 deleted from function.array-flip by irc-html

From: Date: Sat, 19 Jan 2002 21:01:15 +0000
Subject: note 6561 deleted from function.array-flip by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25454@lists.php.net to get a copy of this message
To uniquify a list, this is better $hash = array_flip($array); $array = array_keys($hash); Otherwise: If you just do two array_flip operations, you end up with a sparse array (the elements in the old arrays that were duplicates are left as gaps).

« previous php.notes (#25454) next »