How would I obtain the greatest value in an array if one of the array keys match a value in a string. For instance, the following results would be obtained.
$decenders=array('Q'=>4,'g'=>4,'j'=>5,'p'=>4,'q'=>4,'y'=>4);
$string='ABC'; //results as 0
$string='ABCg'; //results as 4
$string='ABCgj'; //results as 5