What are some common pitfalls when trying to loop through an array with numerical keys in PHP?

One common pitfall when looping through an array with numerical keys in PHP is assuming that the keys start at 0 and increment by 1. It's important to remember that array keys can start at any integer value and may not be sequential. To correctly loop through such an array, you can use the `foreach` loop to iterate over the array elements without relying on the numerical keys.

// Example array with numerical keys
$array = [3 => 'apple', 5 => 'banana', 7 => 'cherry'];

// Loop through the array using foreach
foreach ($array as $key => $value) {
    echo "Key: $key, Value: $value\n";
}