i am searching a text using in_array() function from the array which is fetching database value
$value is the array value.
How can i ignore case in this.
if(in_array($exp[$i],$value))
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use preg_grep() instead:
(the
imodifier added after the/makes it case insensitive)However, since it seems it isn’t an array value, you shouldn’t be using in_array(), but stristr():
(stristr() is the case insensitive version of strstr(), which finds the first occurrence of a string in another string)