$myArray = array (\'SOmeKeyNAme\' => 7);
I want $myArray[\'somekeyname\']
to return 7
.
Is there a way to do this
I know this is old, but in case anyone else needs a quick easy way to do this without actually changing the original array:
function array_key_i($needle, $haystack){
$key=array_search(strtolower($search), array_combine(array_keys($array),array_map('strtolower', array_keys($array))));
return ($key!==false);
}
$array=array('TeSt1'=>'maybe');
$search='test1';
array_key_i($search, $array); // returns true