Bluehost.com Web Hosting $6.95

Re: [PHP] Removing Spaces

This is a discussion on Re: [PHP] Removing Spaces within the PHP General forums, part of the PHP Programming Forums category; Jason Williard wrote: > In parsing a file, I ended up with a number of variables that include > spaces. ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-31-2003
John W. Holmes
 
Posts: n/a
Default Re: [PHP] Removing Spaces

Jason Williard wrote:
> In parsing a file, I ended up with a number of variables that include
> spaces. Is there an easy way to remove a space from a variable?


$new_string = str_replace(' ','',$old_string);

?

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com




Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:08 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0