Apology, was [Re: PHP still can't compare...]

From: Date: Wed, 05 Dec 2001 00:23:28 +0000
Subject: Apology, was [Re: PHP still can't compare...]
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-72531@lists.php.net to get a copy of this message
My apologizes to the list, I was treating this as a alternate form of "IF" instead of the "?" operator. I'll strive to not post crap like this to hackers again. Matthew At 11:08 PM 12/4/2001 +0100, derick@php.net wrote:
Hello, this has to do with operator precendence. Please ask for this kind of support questions on the php-general@lists.php.net mailinglist. Derick On Tue, 4 Dec 2001, Matthew Hagerty wrote: Greetings, Another problem with PHP trying to make a simple comparison and failing... This works: $iQty = -1; if ( isset($g_aForm["qty_$iKey"]) AND is_numeric($g_aForm["qty_$iKey"]) )
      $iQty = $g_aForm["qty_$iKey"];
But this does not: $iQty = ( isset($g_aForm["qty_$iKey"]) AND is_numeric($g_aForm["qty_$iKey"]) ?
      $g_aForm["qty_$iKey"] : -1);
Explain... Thanks, Matthew -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.dev (#72531) next »