I have following array:
$ar3 = array(123, array(12, 665, array(77, 255, 98, 56), 8), 1155, 676);
I need to compare all of its elements with
You can try using recursive function
$value) { if (is_array($value)) { $ar3[$key] = highestValue($value); } } return max($ar3); } echo highestValue($ar3); //1155