Oké. I saw this piece of code and I was curious about how it works and what it does.
Can anyone explain this to me?
Thanks!
$_SESSION['langtype']
= (empty($_SESSION['langtype'])) ? 'false' : $_SESSION['langtype'];
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It puts false in
$_SESSION['langtype']is the value is not set, otherwise it keeps the current value.See also http://php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary