Re: syntax error?

From: Date: Wed, 21 Jun 2000 09:06:24 +0000
Subject: Re: syntax error?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-2472@lists.php.net to get a copy of this message
Hi Jonas! On Mon, 19 Jun 2000, Jonas Jochum wrote: > MC>>IMHO this should be correct, shouldn't it? > MC>>$catid = (isset($HTTP_GET_VARS[catid])) ? &$HTTP_GET_VARS["catid"] : 0; > MC>> ^^^^^ that's the error > MC>How about putting some quotes around 'catid'? > > that's not the problem...the problem is, that I apparently can't > make a reference to a variable in such a conditional... I should be > able to do this: "$a = (isset($b)) ? &$c : &$d;" > the quotes don't help. Neither with nor without them does it work. :-/ But you can either use a cleaner if() or (isset($b) ? $a = &$c : $a = &$d); -- teodor

« previous php.general (#2472) next »