note 21383 added to function.preg-replace

From: Date: Fri, 10 May 2002 18:42:16 +0000
Subject: note 21383 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-30433@lists.php.net to get a copy of this message
I have discovered that my previous example is overly verbose. This well work withouth the extra function call: print preg_replace("/\[desc:([ \w]+)\]/e","\$description['\\1']",$text); I believe someone else has already mentioned this solution. I must have typoed when testing. -- http://www.php.net/manual/en/function.preg-replace.php http://master.php.net/manage/user-notes.php?action=edit+21383 http://master.php.net/manage/user-notes.php?action=delete+21383 http://master.php.net/manage/user-notes.php?action=reject+21383

« previous php.notes (#30433) next »