How can you access specific elements within a multidimensional array in PHP?

To access specific elements within a multidimensional array in PHP, you need to specify the index for each dimension. For example, to access an element in a two-dimensional array, you would use the syntax $array[$index1][$index2]. This allows you to pinpoint the exact element you want to retrieve from the multidimensional array.

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

// Accessing a specific element within the array
echo $array[1][2]; // Outputs 6