Re: Re: pattern containing single quote in IF statement

From: Date: Fri, 05 Jan 2007 00:49:38 +0000
Subject: Re: Re: pattern containing single quote in IF statement
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-246566@lists.php.net to get a copy of this message
On Tue, December 26, 2006 2:42 pm, Frank Arensmeier wrote: > First of all, I strongly feel that you should have double quotes > around the string you like to compare with (e.g. "new"). Otherwise, > you are comparing against a string but to something else (integer ?). > Without quotes, PHP will throw an error (not sure if it will throw a > fatal error or something else). PHP signals an E_NOTICE, which, in the default settings, of E_ALL ~ E_NOTICE of php.ini, is suppressed. [monty python voice] I'm being oppressed here!!! [/monty] So new with no quotes is assumed to be 'new' so it SEEMS to work, even though he's not using E_NOTICE, which is probably the fundamental error. Rant #1: NEWBIES: TURN ON E_NOTICE -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#246566) next »