Maxchen
03 Apr 2011, 10:31 AM
Hi, I trying do something like that:
$string =
'<img src="1.gif" />
<img src="2.gif" />
<img src="3.gif" />
<img src="4.gif" />
<img src="5.gif" />';
$result = preg_replace('/(<img(.*)>$)/', '.', $string, -1);
echo $result;
I must replace all <img src="..." /> except first line, but with no results...
$string =
'<img src="1.gif" />
<img src="2.gif" />
<img src="3.gif" />
<img src="4.gif" />
<img src="5.gif" />';
$result = preg_replace('/(<img(.*)>$)/', '.', $string, -1);
echo $result;
I must replace all <img src="..." /> except first line, but with no results...