For example, if I have an echo statement, there’s no guarantee that the browser might display it right away, might display a few dozen echo statements at once, and might wait until the entire page is done before displaying anything.
Is there a way to have each echo appear in a browser as it is executed?
You can use
flush()to force sending the buffer contents to the browser.You can enable implicit flushing with ‘
ob_implicit_flush(true)‘.