Link to home
Start Free TrialLog in
Avatar of Lightwalker
Lightwalker

asked on

Help breaking down a this php code

Hi All,

I having been getting some help with a custom store that I am building and have been given a piece of code by support that works but I do not understand how and would be grateful if someone could break it down for me.

.(isset($_SESSION['currencySymbol']))?$_SESSION['currencySymbol']:"$".

I understand the isset. So for me this statement says if session "currencySymbol" exists, but I do not know what the ? is for at the end as well as the :"$"
ASKER CERTIFIED SOLUTION
Avatar of bigeven2002
bigeven2002
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dave Baldwin
What he said.  See Ternary Operator on this page: http://www.php.net/manual/en/language.operators.comparison.php