In the function there are two arguments. One is the search string the second is the array to be searched - ok - got that, but what is the purpose of the '&' before the array?
function in_array_nocase($search, &$array) {
$search = strtolower($search);
foreach ($array as $item)
if (strtolower($item) == $search)
return TRUE;
return FALSE;
}