Home > Backend Development > PHP Tutorial > PHP removes html tags to obtain input plain text document strip_tags

PHP removes html tags to obtain input plain text document strip_tags

不言
Release: 2023-02-28 20:52:01
Original
1818 people have browsed it
<?php
$text = &#39;
Test paragraph.
Other text&#39;;
echo strip_tags($text);
echo "\n";

// Allow

echo strip_tags($text, &#39;
&#39;);
?>
Copy after login

The above example will output: Test paragraph. Other text

Test paragraph.

Other text
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