How To Clear Previously Echoed Items In Php

[Solved] How To Clear Previously Echoed Items In Php | Php - Code Explorer | yomemimo.com
Question : How to clear previously echoed items in PHP

Answered by : ammer-alqaisi

<?php
ob_start();
echo 'a';
print 'b';
// some statement that removes all printed/echoed items
ob_end_clean(); // this method clears all echos & test prints
echo 'c';
// the final output is equal to 'c', not 'abc'
?> //s // https://www.codegrepper.com/code-examples/php/php+clear+echo

Source : https://stackoverflow.com/questions/1057986/how-to-clear-previously-echoed-items-in-php | Last Update : Sun, 28 Feb 21

Answers related to how to clear previously echoed items in php

Code Explorer Popular Question For Php