note 35233 rejected from pcre.pattern.modifiers by pollita

From: Date: Mon, 25 Aug 2003 03:50:38 +0000
Subject: note 35233 rejected from pcre.pattern.modifiers by pollita
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55018@lists.php.net to get a copy of this message
Note Submitter: jepe@csapnivalo.hu ---- 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);

« previous php.notes (#55018) next »