<img src="......" width="....." height="...."/>
If I have a function generating the above code, how can I get the width and height attributes with php?
<img src="......" width="....." height="...."/>
If I have a function generating the above code, how can I get the width and height attributes with php?
Do you mean something like this ?
So you would need to use
preg_match_all('/(alt|title|src)=("[^"]*")/i',$img_tag, $img[$img_tag]);
And then foreach them to array.