Problem with PHP ternary operator
<p>I dont understand how that output comes?</p>

<pre>
$a = 2;
echo (
$a == 1 ? 'one' :
$a == 2 ? 'two' :
$a == 3 ? 'three' :
$a == 5 ? 'four' : 'other');
echo "\n";
// prints 'four'
exit;
</pre>

<p>I don't understand how 'four' get printed. please can anyone explain me?
Thanks in advance.</p>
