I have a problem regarding flushing the output buffer to the browser while walking through a for-loop. I want to show a progress bar while my mailing list sending routine is executing. To keep things simple see the following simplified snippet:
Code: Select all
for($i = 0; $i < count($addresses); $i++)
{
mail(...);
echo ".";
ob_flush();
flush();
sleep(1);
}What could be the problem and is there a solution?
Thanks in advance!