How to clear previously echoed items in PHP

前端 未结 5 1099
一生所求
一生所求 2020-12-02 14:21

In php, is there any way to clear/remove all previously echoed or printed items?

For example:



        
5条回答
  •  感动是毒
    2020-12-02 14:43

    Ideally, you shouldn't output anything that you don't ultimately want printed. Keep your logic separate from your presentation for less frustration.

    That being said, you can consult the Output Buffering options within PHP.

提交回复
热议问题