[Solved] find max value of a key in array


Try something like this:

    $max_index = null;
    $max_value = 0;
    foreach($DoctorEducation as $key => $array){
      if($array['degree_type_id'] > $max_value){
        $max_value = $array['degree_type_id'];
        $max_index = $key;
      }
    }
print_r($DoctorEducation[$max_index]);

This gives you the index and the value of the key with the highest degree_type_id

1

solved find max value of a key in array