note 33006 rejected from function.array-search by rioter
| From: | rioter@php.net | Date: | Fri, 13 Jun 2003 16:03:15 +0000 |
| Subject: | note 33006 rejected from function.array-search by rioter | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-50291@lists.php.net to get a copy of this message | ||
Note Submitter: lee@areality.co.uk
----
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