note 72679 deleted from function.preg-replace by nlopess

From: Date: Wed, 31 Jan 2007 13:26:43 +0000
Subject: note 72679 deleted from function.preg-replace by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-122422@lists.php.net to get a copy of this message
Note Submitter: neil at weblator ---- if you need to replace quotes with &quot; in an html string without ruining the html, try this (thanks to Sergei at regexadvice.com for the help on the expression): $string_preg_conv=preg_replace("/\"(?=[^<>]*<)/","&quot;", $string);

« previous php.notes (#122422) next »