Re: Is this the best way?

From: Date: Wed, 19 Mar 2008 13:48:47 +0000
Subject: Re: Is this the best way?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-271781@lists.php.net to get a copy of this message
Jason Pruim wrote:
    $cmd = $iau ? 'verify account' : 'login';
I've seen these kinds of things in other scripts that I've looked at, but don't totally understand what the : does between 2 options...
$cmd = $iau ?         'verify account'     :            'login';
if (^^^^) { $cmd = ^^^^^^^^^^^^^^^^; } else { $cmd = ^^^^^^^; } Simple as that. -Stut -- http://stut.net/

« previous php.general (#271781) next »