i would like to use Ternary Operator for the below code..
<?php
if($users['active'] == 1 )
{
echo 'Yes';
}
else
{
echo 'No';
}
?>
i tried using this code and it does not work..
<?php ($users['active'] == 1) ? echo "Yes" : echo "No"; ?>
what is wrong?