October 13th, 2008, 11:25 PM
I'm not sure where $2 comes from but this works, i've tested it
$pattern = "/(<img\s+).*?src=((\".*?\")|(\'.*?\')|([^\s]*)).*?>/is";
$replacement = "<img src=$2 width=50 height=50>";
echo...
October 13th, 2008, 10:05 PM
sorry...
I have a database that has html content that i display on 2 different pages. In that database the content has several img tags. What i want to do is add width and height to the tag with a...
October 13th, 2008, 04:15 AM
I'm having some issues putting 2 pieces of code together
First part
I have this string
$string = "some text... <img src=myimage.jpg> some more text <img src=myimage.jpg>";
What i want to do...