Q:

$age = 20; print ($age >= 18) ? "Adult" : "Not Adult";

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

Tags

New to Communities?

Join the community