I'm trying to find a way to search my array for a case-insensitive string and the string does NOT have to be exact match... for example: I want to search for "Chris" and my array has a record of "Christopher" which I want this to be a match.
So far I have tried (case-insensitive):
if (preg_grep( "/".$fullname."/i" , $array2 ))
and
if (in_array($fullname, $array2))
but no luck with either one when searching for "Chris" inside my array which contains "Christopher"