Remove non breaking space php

@EchtEinfachTV space is the regular space character between words, whitespace is any kind of space in text: regular space, new line, tab, etc – juuga Sep 13 '13 at You need @ButtleButkus's answer for cleaning up WYSIWYG content, which includes non-breaking spaces. – fideloper Jul 22 '14 at I have a situation where I am passing a string to a function. I want to convert   to " " (a blank space) before passing it to function. Does html_entity_decode does it?. If not how to do it? I am aware of str_replace but is there any other way out? Removing non-breaking spaces? Ask Question 6. I have a query for remove all special characters. But ONE space resists to that query at the end of email string. Example: 'test I think the right whitespace it's a non-breaking space, but my last test with CHAR() in my query didn't work. I am trying to remove all multiple white spaces from get_content(); But in my html post there additional   replacing the additional white space. So I tried this. .. php or use this if it is non-breaking space $content. Non-breaking spaces can be troublesome with trim: To remove multiple occurences of whitespace characters in a string an convert them all into single spaces. Non-breaking spaces (aka   in HTML) look like spaces in editors but are actually interpreted like any other character by PHP. is also available via Cmd+ Y or Ctrl+Y by default so remove the shortcut should be enough.