note 60027 added to function.array-unique

From: Date: Fri, 23 Dec 2005 09:19:52 +0000
Subject: note 60027 added to function.array-unique
Groups: php.notes 
Request: Send a blank email to php-notes+get-100612@lists.php.net to get a copy of this message
PHP Version 4.0.6 System Windows NT 5.1 build 2600 Build Date Jun 22 2001 //---------DOES NOT OUTPUT PROPER ARRAY---------- $A = array_unique($A); //------------------------------------------------------------- //--------CUSTOM BUGFIX--------- $A = explode(":", implode(":", array_unique(A))); //------------------------------------ I noticed a middle key and the last key of the output array being NULL, I was using a simple implode statement to verify the array had the keys. echo implode("", $A); Not sure about this one, but if you have trouble with this function give my fix a little try. Hope it helps. ---- Manual Page -- http://www.php.net/manual/en/function.array-unique.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+60027 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60027&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60027&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60027&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60027&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60027&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60027&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60027&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+60027&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100612) next »