Hi. I'm fairly new to PHP and programming in general. I'm learning mostly
by deconstructing what others have written...but even though I have plenty
of PHP books and have searched the Internet high and low, I'm stumped by the
exact meaning in the following function of what the question mark's
On 17 May 2002 at 12:23, Jeff Field wrote:
$theValue = ($theValue != ) ? ' . $theValue . ' : NULL;
It's a shortened version of the if...else construct. As in...
condition ? this_if_true : this_if_false
--
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Fri, May 17, 2002 at 12:23:45PM -0500, Jeff Field wrote:
I'm stumped by the
exact meaning in the following function of what the question mark's (?)
and colon's (:), mean and do?
That's the ternary comparison operator. See
http://www.php.net/manual/en/language.operators.comparison.php,
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 17, 2002 6:23 PM
Subject: [PHP] what does this mean in plain english?
Hi. I'm fairly new to PHP and programming in general. I'm learning mostly
by deconstructing what others have written...but even though I have plenty
of PHP books
4 matches
Mail list logo