Fw: array_unique: problems with type array?

From: Date: Thu, 16 Aug 2001 19:05:59 +0000
Subject: Fw: array_unique: problems with type array?
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969337126@lists.php.net to get a copy of this message
----- Original Message ----- From: "Holger Schopohl" <poiujkl@gmx.de> Newsgroups: php.dev To: <php-dev@lists.php.net> Sent: Thursday, August 16, 2001 7:10 PM Subject: array_unique: problems with type array? > Hi all, > > is it correct that the following code > (PHP 4.0.6) > > ---snip--- > $a[1]=array(1,2); > $a[2]=array(2,4); > $b=array_unique($a); > print_r($b); > ---snap--- > > output this?: > > --- > Array > ( > [1] => Array > ( > [0] => 1 > [1] => 2 > ) > > ) > --- > > instead of: > --- > Array > ( > [1] => Array > ( > [0] => 1 > [1] => 2 > ) > > [2] => Array > ( > [0] => 2 > [1] => 4 > ) > > ) > --- > > Both entries are not unique and in the documention nobody > write that this case is not allowed. > > Regards, > > -- > Holger

« previous php.doc (#969337126) next »