Re: Value of $_* variables

From: Date: Wed, 06 Mar 2002 02:04:41 +0000
Subject: Re: Value of $_* variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87402@lists.php.net to get a copy of this message
In article <20020305195342.CF56B20D07F@shell.hatesville.com>, jtx@nestllc.com (James Taylor) wrote: > $result = mysql_query("select user from users where id = $_SESSION['id]", > $db); > > That just doesn't work, so I have to first go: > > $sid = $_SESSION['id']; > $result = mysql_query("select user from users where id = $sid", $db); > > Anyway to get around this? Curly braces: $result = mysql_query("select user from users where id = {$_SESSION['id']}", $db); -- CC

« previous php.general (#87402) next »