View Single Post
Old 01-04-2008, 06:04   #1 (permalink)
d*d
Senior Member
 
d*d's Avatar
 
Join Date: Oct 2004
Location: Bristol
Posts: 3,048
removing Html tag attributes in php

anyone know a good way to do this? got a CMS which is accepting style attributes for the <p> tag, which then override my css styles on the site. Need to keep the <p> tag just remove all it's attrinbutes;

so
<p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal">

becomes

<p>
  Reply With Quote