Show results while script is still executing

You can use output buffering like this:

ob_start();

echo('doing something...');

// send to browser
ob_flush();

// ... do long running stuff
echo('still going...');

ob_flush();

echo('done.');
ob_end_flush(); 

Leave a Comment