Home > Backend Development > PHP Tutorial > php怎么输出 敲入的空格符而不是输出 &nbsp

php怎么输出 敲入的空格符而不是输出 &nbsp

WBOY
Release: 2016-06-13 13:10:34
Original
1339 people have browsed it

php如何输出 敲入的空格符而不是输出  
有段html准备输出到客户端,而不是浏览器,除了str_replace外,php有没有函数将空格输出为 [ ] 而不是 [ ]

------解决方案--------------------
替换总是需要的,即便有现成的函数,其内部也还是替换
------解决方案--------------------
get_html_translation_table(HTML_ENTITIES)
得到的就是 html 实体对照

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