Why is a PHP script waiting "to finish script" before any echo/output?
echo, php
Solution
There is a function ob_implicit_flush that can be used to enable/disable automatic flushing after each output call. But have a look at the comments on the PHP manual before using it.
Problem
Considering a simple script ``` <?php echo "hi"; foreach ($_GET['arr'] as $a) { echo $a ."<br>"; } echo "<p>Masel tov</p>"; foreach ($_GET['arr2'] as $a) { echo $a ."<br>"; } ``` i expect the script to echo continuously. Instead the script does echo all-at-once when finished. Even the first "`hi`" gets echoed after 1 minute when the script finishes. Is there a setting to prevent this from happen or why is that so?