Question and answer is powered by AnsPress.io
How to use Ternary Operator in PHP ?
How does ternary code looks like ?
Ternary operator is comparison operator just like if else.
here is code
<pre> $condition = true; echo ($condition) ? 'condtion is true' : 'condition is false'; </pre>