title: Removing inline styles using php
body: <p>I am using php to output some rich text. How can I strip out the inline styles completely?</p>
  
  <p>The text will be pasted straight out of MS Word, or OpenOffice, and into a  which uses TinyMCE, a Rich-Text editor which allows you to add basic HTML formatting to the text. 
  However I want to remove the inline styles on the <p> tags (see below), but preserve the <p> tags themselves. </p>
  
  <pre><code>&lt;p style="margin-bottom: 0cm;"&gt;A patrol of Zograth apes came round the corner, causing Rosette to pull Rufus into a small alcove, where she pressed her body against his. &amp;ldquo;Sorry.&amp;rdquo; She said, breathing warm air onto the shy man's neck. Rufus trembled.&lt;/p&gt;
  &lt;p style="margin-bottom: 0cm;"&gt;&amp;nbsp;&lt;/p&gt;
  &lt;p style="margin-bottom: 0cm;"&gt;Rosette checked the coast was clear and pulled Rufus out of their hidey hole. They watched as the Zograth walked down a corridor, almost out of sight and then collapsed next to a phallic fountain. As their bodies hit the ground, their guns clattered across the floor. Rosette stopped one with her heel and picked it up immediately, tossing the other one to Rufus. &amp;ldquo;Most of these apes seem to be dying, but you might need this, just to give them a helping hand.&amp;rdquo;&lt;/p&gt;
  </code></pre>