Re: Find and Replace
| From: | John W. Holmes | Date: | Mon, 21 Jul 2003 21:57:59 +0000 |
| Subject: | Re: Find and Replace | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29371@lists.php.net to get a copy of this message | ||
Chris Payne wrote:
I have a DB system which i've just rewritten for a travel website. Previously it used <BR>'s for linebreaks but i've made it much more efficient. My problem it, there are 10+ travel guides which us <BR>'s and I want to remove them on over 100 pages (In a MySQL DB). Using PHP, how can I write a simple script to go through all the entries for a column (Called articles) and remove all instances of <br> or <BR> ??? It would take far too long to do it page by page :-(I know this is a PHP list, but why use PHP? UPDATE table SET column = REPLACE(column,'<BR>',''); UPDATE table SET column = REPLACE(column,'<br>',''); -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com