Answers for "How to clear previously echoed items in PHP"

PHP
0

How to clear previously echoed items in PHP

<?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
Posted by: Guest on February-21-2021

Code answers related to "How to clear previously echoed items in PHP"

Browse Popular Code Answers by Language