i have a snippet of code like this :
$response = "<div style='font-size:18px;margin-top:2em;text-align:center;color:#173f5f;>";
$response .= "Intializing sequence...";
echo $response;
$response .= "Starting compression of folders...";
echo $response;
$response .= "Compressing all photos now...";
echo $response;
$ph = compress('photos');
$response .= "Photo compression complete.";
$response .= "Compressing all signatures now...";
echo $response;
$sg = compress('signatures');
$response .= "Signature compression complete.";
$response .= "Compressing all excel files now...";
echo $response;
$excel = compress('uploads');
$response .= "Excel files compression complete.</div>";
echo $response;
i want the messages to be displayed after every line of compress
function call but right now, its running the each call of the functions in a bunch and then displaying the messages in a bunch at the end that too every line repeated.
How can i solve this?