Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #clear #previously #echoed #items #PHP
ADD COMMENT
Topic
Name
8+1 =