Replacing character.
| From: | Bzdpltd at aol dot com | Date: | Mon, 11 Feb 2002 13:13:16 +0000 |
| Subject: | Replacing character. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-16792@lists.php.net to get a copy of this message | ||
Hi again, thanks for those who sent me info on my earlier problem.
Another bit of help needed here.
I have table that contains alot of fields. Now one of the fields in the databse contains information
that I need to be changed when output on a page.
Example:
In the table the field purchase has the following information in 1 of the entries:
This is a book for sale
Now I need this field and this field only on out put to remove all the spaces and replace them with
+ signs.
So it would look like:
This+is+a+book+for+sale
Now I dont want any other spaces apart from the ones in this field to be replaced. i have looked as
some regular expressions, but would like to know if this is possible, and the way to go about it.
Thanks once again, this list is very valuable.
Thanks all
Barry