Revision: 37898
Updated Code
at December 23, 2010 01:55 by iloveitaly
Updated Code
function paragraph_trim($content) { $result = preg_replace('!(^(\s*<p>(\s| )*</p>\s*)*|(\s*<p>(\s| )*</p>)*\s*\Z)!em', '', $content); return $result === NULL ? $content : $result; }
Revision: 37897
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 19, 2010 15:16 by iloveitaly
Initial Code
function paragraph_trim($content) { return preg_replace('!(^\s*<p>(\s| )*</p>\s*|<p>(\s| )*</p>\s*$)!', '', $content); }
Initial URL
Initial Description
Useful for preparing content generated by CKEditor
Initial Title
Trim Empty Paragraph Tags at Beginning & End of String
Initial Tags
Initial Language
PHP