How to replace <span style="font-weight: bold;">foo</span> by <strong>foo</strong> using PHP and reg

Posted by anon on Stack Overflow See other posts from Stack Overflow or by anon
Published on 2010-04-28T10:58:35Z Indexed on 2010/04/28 11:03 UTC
Read the original article Hit count: 252

Filed under:
|

I have a string like this:

<span style="font-weight: bold;">Foo</span>

I want to use PHP to make it

<strong>Foo</strong>

…without affecting other spans.

How can I do this?

© Stack Overflow or respective owner

Related posts about php

Related posts about regex