in_array() - case insensitive
Posted: Sat Jun 19, 2010 2:09 pm
Hi there,
Is it possible to make in_array() case insensitive, or is there another function I can use?
Code: Select all
$array = array('jpg', 'gif');
$extension = explode('.', $_FILES['file']['name']);
$extension = $extension[count($extension)-1];
$continue = in_array($array, $extension) ? true : false;