Simple function for using in_array() with case insensitive querying.

function i_in_array($needle, $haystack) 
{
    return in_array(strtolower($needle), array_map("strtolower", $haystack));
}

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.