Forum Moderators: coopster
How, using php can you check to see if a certain html tag exists in that string and manipulate the contents of the tag?
ie. Search it to see if any Font tags exist, and them manipulate the tags which have Size=2 and change them all to Size=1.
Or store a certain part of the tag, like the size attribute into a $.
Or delete certain attributes, delete the tag all together, or replace the tag with a completely different one like Img.
<img src="myimg.gif" alt="some image description here">
You can then do
$html=preg_replace('/<img.*?alt="(.*?)".*?>)/',"$1",$html);
If you don't have quotes around the value (which you should really) then it is harder but not impossible.