php echoing angle brackets

前端 未结 4 595
有刺的猬
有刺的猬 2020-12-07 04:12

I want to display text on the page, the text should look like this:

... but when I echo this, nothing appears!!

How ca I do thi

4条回答
  •  攒了一身酷
    2020-12-07 05:09

    This is because the browser assumes it is an unknown tag. If you want the browser to show it, use:

    echo '<sometext>'; 
    

    or use the htmlentities function like so:

    echo htmlentities('');
    

提交回复
热议问题