How can CSS be utilized to enhance the formatting of table rows generated by PHP code?

When generating table rows using PHP, CSS can be utilized to enhance the formatting and styling of the rows. By applying CSS styles to the table rows, you can customize the appearance of the data displayed in the table, such as changing the background color, font size, alignment, borders, etc.

// PHP code to generate table rows
echo "<table>";
for ($i = 0; $i < 5; $i++) {
    echo "<tr class='row'>";
    echo "<td>Data 1</td>";
    echo "<td>Data 2</td>";
    echo "</tr>";
}
echo "</table>";
```

```css
/* CSS styles for table rows */
.row {
    background-color: #f2f2f2;
    color: #333;
    text-align: center;
    border: 1px solid #ddd;
}