simple if check ternary operator in php code example
Example 1: php ternary operator
(Condition) ? (Statement1) : (Statement2);
Example 2: ternary in php
print ($marks>=40) ? "pass" : "Fail";
(Condition) ? (Statement1) : (Statement2);
print ($marks>=40) ? "pass" : "Fail";