|
Posted by dysfunct on 10/31/07 12:56
Yeah you guys are right, something is going on with the types. So I
made a search function:
function array_key_search($num, $array){
$found = array();
$n = 0;
foreach ($array as $k => $V){
settype($v,string);
echo gettype($v);
echo gettype($num);
if (strncasecmp($v,$num,6)==0){
$found[$n] = $k;
$n += 1;} }
return $found;
}
I added the echo gettype()'s in there just to see what it was
comparing and they both end up being strings in all cases. Still
doesn't wanna give me any results! I am befuddled.
Navigation:
[Reply to this message]
|