Ternary operator example in php

The Ternary operator is like if-else statement, Ternary operator is made for two different actions, one if the condition is true, the other one if it's false but with nested Ternary operators we can use it like an if-elseif.

Syntax

(condition) ? TRUE : FALSE

<?php
$i=0;
echo $output=($i==0)? "TRUE" : "FALSE";
?>