I've written PHP scripts that update a database and outputs the results to the screen as the script is running. This is nice for scripts that take a while to run so that you can follow the progress. Even though I've done this before, it wasn't intentional and I can't get my current script (that takes 30 minutes) to output while it's running.
How does this work?