Explain the ternary conditional operator in php?
Answer / Tarun Kumar Singh
The ternary conditional operator in PHP is a shorthand way to write an if-else statement. It has the syntax of condition ? expression_if_true : expression_if_false; For example, $result = ($x > 10) ? 'greater than 10' : 'less than or equal to 10';
| Is This Answer Correct ? | 0 Yes | 0 No |
What is Joomla?
What are the functions used in php?
What are the 5 types of data?
Which are the best start and end tags to use?
How many escape sequences are recognized in double-quoted strings in php?
What are the variables in php?
What are the difference between overloading and overriding in oops?
What is slim framework?
What is the difference between characters 34 and x34?
What are getters and setters php?
How can we submit form without a submit button?
Is php an api?