I have a loop that should output a variable every 2 seconds, 10 times. I tried it like this, but it displays everything at once in 20 seconds. That is, she waits until the action is executed 10 times. And I need it so that if the loop runs once, then output once, and then after two seconds, print the second value.
<?php for ($i=0; $i <10 ; $i++) { echo $_POST['name']; echo $_POST['number']; sleep(2); } ?>