conditional value ? : php code example
Example 1: php ternary operator
(Condition) ? (Statement1) : (Statement2);
Example 2: php if
<?php
if ($a > $b) {
echo "a is bigger than b";
$b = $a;
}
?>
(Condition) ? (Statement1) : (Statement2);
<?php
if ($a > $b) {
echo "a is bigger than b";
$b = $a;
}
?>