Tag Archives: logic

Condition with Ternary Operator

$var = 5;

echo $var_is_greater_than_two = ($var > 5 ? ‘ok’ : ‘notok’);

Advertisements
%d bloggers like this: