PHP - Conditional Statements
Identify the syntax error in the following PHP code using the ternary operator:
$score = 85;
$result = $score >= 70 ? 'Pass' 'Fail';
echo $result;
$score = 85;
$result = $score >= 70 ? 'Pass' 'Fail';
echo $result;
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions