I need to fix this.
here is only part of my code
<?php $number = 30; while($number > 0) { $number--; sleep(30); print "$number . Posted<br>"; } ?>
The cycle process in a cycle is actually a lot more, I just put the important stuff.
In any case, as you can see, it should print 30 messages
(wait 30 seconds)
29 Added | (wait 30 seconds)
28 Added | (wait 30 seconds)
But instead, it waits until the cycle ends, and then simply prints everything at once. Can this be fixed somehow? I was thinking about ajax method, but I don't know anything.
ajax loops php while-loop echo
Joseph Robidoux
source share