What is the ternary conditional operator in php?
Answer / Sudhir Kumar Gupta
In PHP, the 'ternary conditional operator' (also known as the 'conditional expression') is a shorthand way to write an if-else statement. It has the format: (expression1) ? (expression2) : (expression3). For example: <?php $var = 10; $result = ($var > 5) ? 'Greater than 5' : 'Less than or equal to 5'; ?>
| Is This Answer Correct ? | 0 Yes | 0 No |
Can you host WordPress using Amazon web services such as EC2, RDS, EBS, etc.?
How do I disable trackbacks and pingbacks?
Why wordpress is so popular?
Is there a wordpress certification?
How do I put a youtube social link on facebook?
What are shortcodes in wordpress?
What's the difference between a blog and a website?
How do I restore my wordpress theme?
How we can update wordpress?
Tell me do you know why doesn't the following code print the newline properly?
Can I build wordpress site offline?
When will you not be able to see the plugin menu in a wordpress site?