Re: Find and Replace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

Ahhh thanks, that was a quick way to do it, I took the long way around LOL
:-)

I grabbed the data, did $article = str_replace("<br>", "", $article); and
then looped through all of the entries to change it, it seems to have worked
though :-)

Chris

> 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
>
>
>
>
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux