How can the usage of multi-dimensional arrays in PHP improve the efficiency and readability of the code provided in the forum thread?

Issue: The code in the forum thread is using multiple arrays to store related data, leading to confusion and decreased readability. By utilizing multi-dimensional arrays, we can organize the data more efficiently and improve code readability.

// Using multi-dimensional arrays to organize related data
$data = array(
    array(
        'name' => 'John Doe',
        'age' => 25,
        'email' => 'john.doe@example.com'
    ),
    array(
        'name' => 'Jane Smith',
        'age' => 30,
        'email' => 'jane.smith@example.com'
    )
);

// Accessing data from the multi-dimensional array
echo $data[0]['name']; // Output: John Doe
echo $data[1]['email']; // Output: jane.smith@example.com