Napisz, jeśli i jeszcze w jednym wierszu PHP
$result = ($data->status == 1) ? 'active' : 'disable'
Zamir
$result = ($data->status == 1) ? 'active' : 'disable'
/* most basic usage */
$var = 5;
$var_is_greater_than_two = ($var > 2 ? true : false); // returns true
<?php if ($requestVars->_name == '') echo $redText; ?>