What is this PHP Syntax: ($variation_id>0) ? $variation_id : $item_id;
- by user1325258
Is someone able to explain the meaing of the following statment, and the type of php it is reffering to so I can do further research:
$foo = ($variation_id>0) ? $variation_id : $item_id;
I have tried search but don't really know what i'm searching for.
What I am trying to find out is the name and meaning of the following syntax
? / : and is ($variation_id>0) just a shorthand if statement ?
-- I just stumbled upon conditional variables although a nice simple explanation would still be appreciated.