I have seen this question asked on many boards and I have never seen an answer that worked or even addressed the question.
Lets say I have a game that depicts a battle.
As the battle ensues the volley results are displayed on the page.
The current php code has the entire battle displayed all at once.
I wanted there to be a 2 second delay between the volley displays.
example this is what is displayed by the script
player1 hits player2 and deals 24 damage.
player2 hits player1 and deals 21 damage.
I don't want the page to be delayed.
I want the output delayed.
I have seen 1 question on this board that was just like this question.
I don't think the sleep function will cause the output to delay.
as The loop runs, one line of output should be displayed
and after 2 seconds the next line of output should be displayed
and so on until the loop is broken by the code.
everything is working right now except for the delay.