What are the limitations of using a foreach loop in PHP for multi-dimensional arrays in this context?

When using a foreach loop in PHP for multi-dimensional arrays, the loop only iterates over the outermost array. To access the inner arrays and their elements, you need to nest another foreach loop within the outer loop.

$multiArray = array(
    array(1, 2, 3),
    array(4, 5, 6),
    array(7, 8, 9)
);

foreach ($multiArray as $innerArray) {
    foreach ($innerArray as $value) {
        echo $value . " ";
    }
}