Php Remove Nbsp From String

[Solved] Php Remove Nbsp From String | Php - Code Explorer | yomemimo.com
Question : php remove nbsp from string

Answered by : indian-gooner

$string = htmlentities($content, null, 'utf-8');
$content = str_replace(" ", "", $string);
$content = html_entity_decode($content);

Source : https://stackoverflow.com/questions/9870974/replace-nbsp-characters-that-are-hidden-in-text/9871045 | Last Update : Thu, 12 Aug 21

Answers related to php remove nbsp from string

Code Explorer Popular Question For Php