note 67900 added to function.preg-replace

From: Date: Thu, 06 Jul 2006 07:09:16 +0000
Subject: note 67900 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-114484@lists.php.net to get a copy of this message
@Graham: Your function from march, 16th works only error free, if tag (if it is only one) in your source is closed. So I came along to add a pseudo-Tag around source and everything runs well ;) function strip_styles($source=NULL) { # and pseudo-Tag $source = '<parse>'.$source.'</parse>'; [...] rest of function # and return it this way: return (str_replace(array('<parse>','</parse>'),"",$source)); } ---- Server IP: 212.124.37.9 Probable Submitter: 80.145.215.72 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.preg-replace.php Edit -- http://master.php.net/note/edit/67900 Del: integrated -- http://master.php.net/note/delete/67900/integrated Del: useless -- http://master.php.net/note/delete/67900/useless Del: bad code -- http://master.php.net/note/delete/67900/bad+code Del: spam -- http://master.php.net/note/delete/67900/spam Del: non-english -- http://master.php.net/note/delete/67900/non-english Del: in docs -- http://master.php.net/note/delete/67900/in+docs Del: other reasons-- http://master.php.net/note/delete/67900 Reject -- http://master.php.net/note/reject/67900 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114484) next »