1ytr8q
Last Updated: February 25, 2016
·
5.096K
· hobnob

Case Insensitive Array search in PHP

I found this here:
http://www.php.net/manual/en/function.array-search.php#101869

A case insensitive PHP array_search:

array_search(
    strtolower($element), 
    array_map('strtolower',$array)
);