$age = 20; print ($age >= 18) ? "Adult" : "Not Adult"; code example
Example: $age = 20; print ($age >= 18) ? "Adult" : "Not Adult";
// ternary operator (?:)
$age = 20;
print ($age >= 18) ? "Adult" : "Not Adult";
// ternary operator (?:)
$age = 20;
print ($age >= 18) ? "Adult" : "Not Adult";