single line if else php code example
Example 1: php inline if
/* most basic usage */
$var = 5;
$var_is_greater_than_two = ($var > 2 ? true : false); // returns true
Example 2: if online php
<?php echo ($requestVars->_name == '') ? $redText : ''; ?>
Example 3: one lin if statement php
<?php if ($requestVars->_name == '') echo $redText; ?>