Removing White Space by John • March 24, 2005 • PHP, Snippets • 0 Comments Quick Snippet to remove all the white space from a string. < ?php $string = "mary had a monkey called Booboo "; $text = preg_replace("/(\s)/", "", $string); ?> Related PostsNo Related Post