$value){ if(is_array($value)){ $count += array_sum_assoc($value); }else{ $count += $value; } } return $count; } ?>