in_array - what the...
| From: | Gary . | Date: | Fri, 25 Jun 2010 07:17:40 +0000 |
| Subject: | in_array - what the... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-306417@lists.php.net to get a copy of this message | ||
If I have an array that looks like
array(1) {
["mac_address"]=>
string(2) "td"
}
and I call
if (in_array($name, self::$aboveArray))
with $name as
string(11) "mac_address"
what should be the result?
Because it is *false* and it is driving me nuts! This despite the fact
that if I do
$foo = self::$aboveArray[$name];
$foo then has the value
string(2) "td"
Am I not understanding what in_array does? Is there some bug in php that
has been present since 5.2.12 and still is? *bangs head against desk*