Escape HTML to PHP or Use Echo? Which is better?

前端 未结 13 729
无人共我
无人共我 2020-12-01 04:34

In terms of performance , what would be better. Using PHP to echo all the HTML output so I can pepper it with the various bits of working code and variables or escape HTML t

13条回答
  •  一生所求
    2020-12-01 05:00

    You should seriously consider never placing PHP inside of HTML. You are mixing logic with view which makes a project messy.

    As others have said, if you output into html, use

    If you have to output a ton of information look into output buffering.

提交回复
热议问题