• Removing White Space

    by  • 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 Posts

    • No Related Post

    Leave a Reply

    Your email address will not be published. Required fields are marked *