Home >Backend Development >PHP Tutorial >A small example of converting html tags in php

A small example of converting html tags in php

WBOY
WBOYOriginal
2016-07-25 09:12:231032browse

php如何转换html标签,使其能在浏览器中正常显示? 在编程中需要把提交的内容转化成html标签,这样才能在浏览器中正常显示。

比如要把'echo $new; //out <a href='test'>Test</a>

  • echo html_entity_decode($new); //out Test
  • ?>复制代码


  • Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn