I also encounter problem with array_keys().
here are the source code:
$table1 = array(
"formed" => "¦¨§Î",
"liquid" => "²Gª¬",
"semi-fluid" => "¥b²Gª¬",
"semi-liquid" => "¥b²Gª¬",
"hard" => "°íµw",
"brown" => "½Å¦â",
"yellow" => "¶À¦â",
"black" => "¶Â¦â",
"tarry" => "Ãw«C¦â",
"(-)" => "-",
"(+)" => "+",
"positive" => "+",
"negative" => "-",
"(+)positive" => "+",
"(-)neg" => "-",
"0" => "F",
"1" => "M"
);
$keys = array_keys($table1);
if (in_array("abcdefghi", $keys)) {
printf("in array!<br>");
}
Obviously, "abcdefghi" not in the array $keys. But the program answer "in array!".
I think this is the bug of array_keys() in PHP 4.0.6.
I test this on W2k pro plateform.
growbal@pchome.com.tw