note 33006 added to function.array-search

From: Date: Fri, 13 Jun 2003 15:03:43 +0000
Subject: note 33006 added to function.array-search
Groups: php.notes 
Request: Send a blank email to php-notes+get-50289@lists.php.net to get a copy of this message
Does this work on the first element in the array (i.e $haystack[0])? $array="el1-el2-el3"; $elements=explode("-",$array); // I debug this with while (list ($key, $val) = each ($assignedhotels)) { echo "$key => $val<br>\n"; } // and get expected 0 =>el1 1 =>el2 2 =>el3 but array_search("el1",$assignedhotels) returns false. Any ideas? Cheers ---- Manual Page -- http://www.php.net/manual/en/function.array-search.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33006 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33006&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33006&report=yes

« previous php.notes (#50289) next »