ob_start() doesn’t seem to be stopping any output so when I flush the buffer it’s doubling up
<?php
ob_start();
echo "Text..... <br />";
echo ob_get_flush();
?>
Outputs
Text.....
Text.....
But I was expecting
Text.....
Any ideas ?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Remove the echo on the last line.
ob_get_flush()implicitly prints the stored output and also returns it so you’re printing it out twice.You may have confused
ob_get_flush()withob_get_clean()