Re: Re: Value of $_* variables

From: Date: Wed, 06 Mar 2002 03:58:42 +0000
Subject: Re: Re: Value of $_* variables
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-87415@lists.php.net to get a copy of this message
On Wednesday 06 March 2002 10:01, bvr wrote: > Yes, there is, strings should *always* be quoted! > > See: http://www.php.net/manual/en/language.types.array.php > > it's under do's and don'ts .. > > bvr. > > Mike Eheler wrote: > > $result = mysql_query("select user from users where id = > > $_SESSION[id]", $db); > > > > No need to quote the key name in a string. What Mike meant was: echo "$doo[dah]"; # is correct echo $doo['dah']; # is correct echo "$doo['dah']; # is incorrect (and I think, produces a parse error) -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Philosophy: A route of many roads leading from nowhere to nothing. -- Ambrose Bierce */

« previous php.general (#87415) next »