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

A small example of converting html tags in php

WBOY
Release: 2016-07-25 09:12:23
Original
1044 people have browsed it

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

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

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


  • Related labels:
    source:php.cn
    Statement of this Website
    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
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template