Ternary operation php operators 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";