Ive got a large string with some markup in it I want to change in order for it to work with fpdf.
<span style="text-decoration: underline;">some text</span>
I need to replace the tags here with
<i>some text</i>
However a simple str_replace(); wont work because there are span tags that should not be replaced. I need to make something that finds <span style="text-decoration: underline;">
and then looks for the next occurence of </span>
and only replaces that. I haven't got the slightest clue on how to do this. I've looked at http://us.php.net/strpos but not sure on how to implement that, and if that will be the solution. Can anyone give me some pointers?
Thanks.