There is an array:
$arr = array(
'AA' => 90,
'AB' => 150,
'BC' => 100,
'CD' => 60
);
and a string:
$val = 'CD'
Is there any quick way (without FOR loop) to define the numeric value corresponding to $val
? In this example the result must be 60.