I have an array that looks like:
Array ( [2.5] => ABDE [4.8] => Some other value )
How would I find any key/value pair where the k
you can simply loop through the array and check the keys
$array = array(...your values...); foreach($array as $key => $value) { if (preg_match($pattern,$key)){ // it matches } }
You can wrap it in a function and pass your pattern as parameter