I have a case where I need to pause a loop for a few seconds. The SLEEP() function does this well.
However, it appears that when in a loop, sleep() will not output anything, until the loop is completed. So, if there are 10 iterations in a loop, the result for each iteration doesn't get output to a webpage. Instead, it is stored until the loop completes. The whole result is then written to a webpage in a bunch.
What I need is to be able to output the result of each loop as it is executed, then sleep, then output next result, then sleep, etc.
Is there a way to break out of a loop, so that its result can be shown, then return to the loop where it left off?
TIA,
Richie.