What are some common challenges when working with arrays in PHP?

One common challenge when working with arrays in PHP is accessing specific elements within a multi-dimensional array. To access a specific element in a multi-dimensional array, you need to specify the index for each dimension. For example, to access an element in a two-dimensional array, you would use $array[$i][$j], where $i is the index of the outer array and $j is the index of the inner array.

// Accessing a specific element in a multi-dimensional array
$multiArray = array(
    array(1, 2, 3),
    array(4, 5, 6),
    array(7, 8, 9)
);

echo $multiArray[1][2]; // Output: 6