You are here: String replace inside <img> « PHP « IT news, forums, messages
String replace inside <img>

Posted by Fredrik Arild Takle on 01/07/05 01:32

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация