Ternary operator logic is the process of using “(condition) ? (true return value) : (false return value)” statements to shorten your if/else structures.
What Does Ternary Logic Look Like?
/* most basic usage */
$var = 5;
$var_is_greater_than_two = ($var > 2 ? true : false); // returns true
$jk_display_bpos_set = ($jk_display_bpos == 'left') ? 'left' : 'right';