There is a multilevel array of type
$arr = [ 'a' => 1, 'b' => 2, 'c' => [ 'a' => 1, 'b' => 2, 'c' => [ 'a' => 1, 'b' => 2, 'c' => [ 'd' => 3, 'e' => 4, 'f' => 5, ], ], ], ]; I need to get to the last C array and return it. I understand that some recursive function is needed, but I don’t understand how to write it. Since this is just an example, my array can contain both 10 levels and more ...
cin all the keys? or they may be different? among the elements on one level can there be only one array? and does it have a keyсor does it have to find an array with maximum nesting? - teran