Beginner
PHP
Q31 / 100
What does the ternary operator look like in PHP?
Correct! Well done.
Incorrect.
The correct answer is B) $condition ? $x : $y
B
Correct Answer
$condition ? $x : $y
Explanation
The ternary operator $result = $condition ? "yes" : "no" evaluates to $x if true, $y if false.
Progress
31/100