note 19831 deleted from function.preg-replace by sniper

From: Date: Tue, 30 Sep 2003 12:30:12 +0000
Subject: note 19831 deleted from function.preg-replace by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-57471@lists.php.net to get a copy of this message
Note Submitter: jmay[at]cs[dot]selu[dot]edu ---- Just a note to save someone else a headache like mine on an obscure problem... I was parsing vars from a form, and converting to mixed case like: $a= preg_replace("/([A-Za-z]{1})([A-Za-z]+)/e", "strtoupper($1).strtolower($2)", $a); and got a one-in-a-million parse error on an address like 1234 Sunset Lane. See why? First word, 2nd part is 'unset', and the reserved word caused the error! Make sure to add single quotes around this kind of stuff.

« previous php.notes (#57471) next »