Hello,
But can you be more specific what I need to do with this function?
How to use it in the context?
Thanks
Pedja <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> function array_search ($needle, $haystack, $strict = FALSE)
>
>
> foreach (array_keys($haystack)
function array_search ($needle, $haystack, $strict = FALSE)
foreach (array_keys($haystack) as $key)
{
if ($strict) {
if ($haystack[$key] === $needle) return $key;
}
else {
if ($haystack[$key] == $needle) return $key;
}
}
return FALSE;
}
"Ewunia" <[EMAIL PROTECTED]> wrote in message
mixed array_search (mixed needle, array haystack, bool strict)
Searches haystack for needle and returns the key if it is found in the
array, FALSE otherwise. If the third parameter strict is set to TRUE then
the array_search() will also check the types of the needle in the haystack.
function a
3 matches
Mail list logo