What are the recommended methods for displaying query results with proper formatting, including line breaks, in PHP?

When displaying query results in PHP, it's important to format the output properly to make it readable. One common issue is the lack of line breaks between each result, which can make the output difficult to interpret. To solve this, you can use the PHP "\n" escape sequence to add line breaks when displaying the results.

// Assuming $results is an array of query results
foreach($results as $result) {
    echo $result['column1'] . "\n";
    echo $result['column2'] . "\n";
    // Add more columns as needed
    echo "\n"; // Add an extra line break between each result
}