Google Analytics

Pages

Thursday, June 24, 2010

getting rid of attributes (e.g.: witdth & height)

Here is a handy small piece of php code which get rid of specific tag attributes (width and height in the example below)

$html = preg_replace("#(width|height)=[\'\"](\d)+[\'\"]#ies","",$html);

0 comments:

Share it