how to clear previously echoed items in php

Solutions on MaxInterview for how to clear previously echoed items in php by the best coders in the world

showing results for - "how to clear previously echoed items in php"
Silvana
08 Jul 2020
1<?php
2
3ob_start();
4echo 'a';
5print 'b';
6
7// some statement that removes all printed/echoed items
8ob_end_clean(); // this method clears all echos & test prints
9
10echo 'c';
11
12// the final output is equal to 'c', not 'abc'
13
14?>
15  
16  //s 
17  // https://www.codegrepper.com/code-examples/php/php+clear+echo
18