SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Non-Member Andy Forsberg's Avatar
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    639
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What's an easy way to remove white space from a variable?

    What's an easy way to remove white space from a variable?

  2. #2
    SitePoint Addict
    Join Date
    Apr 2004
    Location
    Regina, SK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $var preg_replace('/\s/','',$var); 
    Reduce or eliminate spam on your sites without CAPTHCAs
    - maybe it is possible: http://formantispam.thekerrs.ca/

  3. #3
    Non-Member Andy Forsberg's Avatar
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    639
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome, thanks a lot nos! I'd give you rep if we still could.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •