in_array - what the...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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*

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux