Hi,
I can't quite figure it out, I'm looking for some regex that will add an atttribute to a html tag.
For example lets say I have a string with an <a>
in it, and that <a>
needs an attribute added to it, so <a>
get's added style="xxxx:yyyy;"
. How would you go about doing this?
Ideally it would add any attribute to any tag.
Am I asking to much of php + regex, should I be building a class to do this sort of thing instead?
Cheers!