When you want to build condition like below:
if($result == ''){
$result = 'Empty Value';
}else{
$result = $result;
}
You assign string 'Empty Value' to result when it is empty
But this condition can be done with one line condition, which called ' ternary operator'
============================================
variable = condition ? {true_action} : {false_action};
============================================
$result = empty($result) ? 'Empty Value' : $result;
this is mean:
if $result empty, it will take the 'Empty Value' as the value, else if will take $result
This method make your code shorter, clean. But if the condition is too complicated, not recommended using this method since the normal if else condition more readable.