What are the potential pitfalls of using non-numerical arrays in PHP?

Using non-numerical arrays in PHP can lead to confusion and make code harder to read and maintain. It is best practice to use numerical arrays for storing indexed data to ensure clarity and consistency in your code. If you need to associate keys with values, consider using associative arrays instead.

// Example of using an associative array instead of a non-numerical array
$person = [
    'name' => 'John Doe',
    'age' => 30,
    'city' => 'New York'
];