Hi to all!
I'm using for the first time the function array_search and I'd like to understand the error it gives to me. This is the code:
$array=array(1, 2, 3, 4);
function foo ($a, $b, $c, $d) {
$key1 = array_search($a, $array);
$key2 = array_search($b, $array);
echo $key1." ".$key2;
}
foo ($e, $f, $g, $h);
And this is the error:
Warning: Wrong datatype for second argument in call to array_search in URL on line n
Any idea?
Thanks a lot _
Daniel