Print less-than and greater-than symbols in PHP

后端 未结 7 766
南方客
南方客 2020-12-01 16:01

I am have troubles trying to print out < > symbols in HTML using PHP.

I am appending a string \"\" to a v

7条回答
  •  心在旅途
    2020-12-01 16:42

    echo htmlentities($output);
    

    or

    echo htmlspecialchars($output);
    

    If you don't want to bother manually going through your string and replacing the entities.

提交回复
热议问题