String replace inside <img>

From: Date: Thu, 06 Jan 2005 23:32:56 +0000
Subject: String replace inside <img>
Groups: php.general 
Request: Send a blank email to php-general+get-205811@lists.php.net to get a copy of this message
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

« previous php.general (#205811) next »