I have a loop that loops through and sets $q to certian tags in an HTML documet such as body UL etc etc. It also sets $a to a list of styles for that tag.
There are no <> in the $q variable.
What I need to do is for each loop is change.
<BODY> into <BODY style="color: #000000;" > etc etc
I was going to do for each loop something like
$templatein = preg_replace('/<$q/','<$q style=\"$a\"',$templatein);
just can't seem to get it to work. Should be pretty str8 forward. I'm just new to PCRE.
Thanks
Robert