How to remove nbsp in php

藏色散人
Release: 2023-03-03 14:38:01
Original
8059 people have browsed it

How to remove nbsp from php: First create a PHP code sample file; then pass "preg_replace("/(\s|\ \;| |\xc2\xa0)/", " ", strip_tags( $val));" method can remove all nbsp.

How to remove nbsp in php

Recommended: "PHP Video Tutorial"

php Remove all & nbsp and html tags (& nbsp Line break)

The code method is as follows:

preg_replace("/(\s|\&nbsp\;| |\xc2\xa0)/", " ", strip_tags($val));
Copy after login

The above is the detailed content of How to remove nbsp in php. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!