What are some best practices for structuring multi-dimensional arrays in PHP to avoid performance issues?

When working with multi-dimensional arrays in PHP, it is important to structure them efficiently to avoid performance issues. One best practice is to avoid deeply nested arrays as they can impact performance. Instead, consider using associative arrays or objects to store complex data structures. Additionally, try to keep the array keys meaningful and avoid using numeric keys for associative arrays.

// Example of structuring a multi-dimensional array efficiently
$data = [
    'user1' => [
        'name' => 'John Doe',
        'age' => 30,
        'email' => 'john@example.com'
    ],
    'user2' => [
        'name' => 'Jane Smith',
        'age' => 25,
        'email' => 'jane@example.com'
    ]
];