What function can be used to prevent output buffering and display the echo statements immediately?

To prevent output buffering and display the echo statements immediately in PHP, you can use the `flush()` function. This function will send the output buffer to the browser immediately, ensuring that any echo statements are displayed as soon as they are called.

// Prevent output buffering and display echo statements immediately
ob_implicit_flush(true);

// Loop to demonstrate immediate output
for ($i = 1; $i <= 5; $i++) {
    echo "Output $i<br>";
    flush();
    sleep(1); // Adding a delay to better demonstrate immediate output
}