Does anyone know how to output stuff I echo to a browser while the script is running?
I have a long loop that I'd like to output a string after every run of the loop, kind of like a progress bar, does anyone know how to do that?
Use the ob_flush() function:
ob_start();
//echo stuff...
ob_flush();
//echo more stuff...
ob_flush();
ob_flush() is called. It is up to the server, not PHP, to do this.