in reply to Re: Weird ?: behavior
in thread Weird ?: behavior

$hour > 11 ? ($xm = 'pm') : $xm = 'am';

To make this a little clearer, this is the same as:

if( $hour > 11 ) { ( $xm= 'pm' )= 'am'; } else { $xm= 'am'; }

So $xm is always set to 'am'.

        - tye (but my friends call me "Tye")