Below is a simplified version of what I am doing. I want to print 5 names from a mysql table, but I want there to be a five second delay between each name as they are printed. Instead of the desired result, the script delays for 20 seconds, then prints all the names at once. Any solutions?
Thanks in advance,
Owen The Samoan
<?php
$result = mysql_query("select username from users limit 0,5") or die (mysql_error());
while ($row = mysql_fetch_array($result)){
echo $row['username'].'<br>';
sleep(5);
}
?>