영원한사랑

$a[0] = 'a';
$a[1][0] = 'b';
$a[2][0][0] = 'c';
$a[2][0][1][2] = 'd';
$a[2][0][1][5][0] = 'e';

function array_deep(&$arr, $deep = 0)
{
    if(!is_array($arr)) {
        return $deep;
    }
    $deep ++;
    foreach($arr as $key => $value) {
        $deeps[] = array_deep($arr[$key], $deep);
    }
    return max($deeps);
}

출처:PHPSCHOOL 송효진님