Forum Moderators: coopster
I thought I could just drop this in my while loop but its not working as expected.
Instead of outputting one row at a time, its generating all the output after the loop has finished.
$result = @mysql_query("SELECT * FROM emails");
while ($record=mysql_fetch_array($result)) {
echo $record["email"];
sleep(3);
}
For example, if the loop returns 10 records, I wanted to echo each one with a 3 second pause between each.
But in practice the script is pausing 30 seconds, then outputting all 10 records.