Explain me what is the ternary conditional operator in php?
Answer Posted / Mr Sumant Kumar
The ternary conditional operator is a shortcut for if-else statements in PHP. It has the syntax: expression ? expression_if_true : expression_if_false; Example: $result = 10 > 20 ? 'Ten is greater than twenty' : 'Ten is not greater than twenty';
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers