How can the code provided be improved for efficiency and readability?

The code can be improved for efficiency and readability by using a foreach loop to iterate over the $data array instead of accessing elements by index. This will make the code more concise and easier to understand.

$data = array("John", "Doe", "john.doe@example.com");

// Using a foreach loop to iterate over the $data array
foreach($data as $value){
    echo $value . "<br>";
}