String replace inside <img>

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

 



I have a some problems doing a search and replace in a string.
I want to replace:
<img ALT="" src="base/image.php?id=3" border=0>
with
<img ALT="" src="image.php?id=3" border=0>

Note ALT, src, border properties may come in random order.

My solution today is a not good enough because I only do an eregi_replace on 
all image.php, I only want to replace those inside a <img>

Todays solution
 $string = eregi_replace("base\/image.php", "image.php", $string);

Solution?

Best Regards
-Fredrik A. Takle 

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux