getting 2 different outputs while using the same currency 'egp'
$currency = ($q->currency == 'egp')? '£' : (($q->currency == 'usd') ? '$' : '€');
this line outputs $
$currency = ($q->currency == 'egp')? '£' : ($q->currency == 'usd') ? '$' : '€';
this one outputs £
and I can't find why?
note: the only difference is the ()
around the second ternary operator statement