php if else one liner code example
Example 1: if online php
<?php echo ($requestVars->_name == '') ? $redText : ''; ?>
Example 2: write if and else in one line php
$result = ($data->status == 1) ? 'active' : 'disable'
Example 3: one lin if statement php
<?php if ($requestVars->_name == '') echo $redText; ?>