I have an array which gives me correct results when I print it, for example:
[0] => [email protected],
[1] => 0909,
[2] => [email protected],
[3] => 0909
Now, when I want to check if [email protected] is in the array it gives me an error that the value doesnt exist in this array, but when I try for example [email protected] it gives the correct result.
This is a little part of the code: $user is the word I want to search, $arrayname is the array.
if (array_search(strtolower($user),array_map('strtolower',$arrayname))){
//value exist
}
else{
//value does not exist
}
Now [email protected] doesn't exist it says, while [email protected] does exist.
Who has any idea?