2

A beginner here, already tried to find below code in the existing questions but no result.

Could you please help me understand the below piece of code? Is it possible to have true and false status at the same time in PHP? My understanding was that a statement can either be true or false at a time, not both!

$myDebugVar = ($_GET["debug"]=="yes")?true:false;

Thank you for your help.

***To our friends who marked this question as duplicate and gave me a link to refer to: in the link you have given, they only explain the definition of the signs in PHP whereas my question was more on a specific piece of code and why true and false are being used at the same time here!

Irfana
  • 231
  • 3
  • 11

0 Answers0