teranry operator in php code example
Example 1: php ternary operator
(Condition) ? (Statement1) : (Statement2);
Example 2: php ternary shorthand
$y = $x ? "true" : "false";
(Condition) ? (Statement1) : (Statement2);
$y = $x ? "true" : "false";