note 35233 added to pcre.pattern.modifiers
| From: | jepe at csapnivalo dot hu | Date: | Sun, 24 Aug 2003 15:52:27 +0000 |
| Subject: | note 35233 added to pcre.pattern.modifiers | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-54992@lists.php.net to get a copy of this message | ||
hi,
i just noticed that if the evaluative mode \e is switched ON,
php is only gonna execute ONLY ONE LINE and not the whole piece of code that U put there ..
i mean if U wanna add values to a variable U can do it ONLY ONCE, only to one variable ...
for example this doesn't seem to work as expected:
preg_replace("/(PATTERN1)(PATTERN2)/e", "\$thing1=\"$1\";
\$thing2=\"$2\"; ", $stuff);
but it works like this:
preg_replace("/(PATTERN1)(PATTERN2)/e",
"\$thing=array(\"$1\",\"$2\"); ", $stuff);
----
Manual Page -- http://www.php.net/manual/en/pcre.pattern.modifiers.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35233
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35233&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35233&report=yes