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['currenc ySymbol']) )?$_SESSIO N['currenc ySymbol']: "$".
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 :"$"
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['currenc
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What he said. See Ternary Operator on this page: http://www.php.net/manual/en/language.operators.comparison.php