Consider the following code:
<?php
while ($i<50) {
echo $i;
$i++;
}
I would expect each succeeding value of $i to be echoed to the screen until the loop completed, but what happens is that the loop completes and THEN all the values are printed to the screen simultaneously! Even if I slow the process down with a "sleep(1)" the screen remains blank until the loop finishes and then everything is plonked onto the screen. The same thing happens with a FOR loop as well.
Any ideas?