title: Transforming <span style="font-weight:bold">some text<span> into <b>some text</b> in PHP
body: <p>As title, If I have some html <code>&lt;p&gt;&lt;span style="font-style:italic"&gt;abcde&lt;/span&gt;&lt;span style="font-weight:bold"&gt;abcde&lt;/span&gt;&lt;/p&gt;</code>, I want to strip the style tags and transform them into html tags, so to make it become <code>&lt;p&gt;&lt;i&gt;abcde&lt;/i&gt;&lt;b&gt;abcde&lt;/b&gt;&lt;/p&gt;</code>. How can I do that in PHP?</p>
  
  <p>I notice that when I open the html in CKEditor, this kind of transformation is done automatically. But I want to do it in backend PHP. Thanks.</p>