What is the correct syntax for using a ternary expression in PHP?

When using a ternary expression in PHP, the syntax is as follows: condition ? value_if_true : value_if_false. This allows for a concise way to write conditional statements in a single line of code. Example:

// Using a ternary expression to assign a value based on a condition
$age = 25;
$can_vote = $age >= 18 ? "Yes" : "No";
echo $can_vote; // Output: Yes