What is the correct syntax for using if statements within an echo statement in PHP?

When using if statements within an echo statement in PHP, the correct syntax is to close the echo statement before the if statement and then reopen it after the if statement. This allows you to concatenate the output of the if statement with the rest of the echoed content.

<?php
$number = 10;

echo "The number is: ";
if($number > 5){
    echo "greater than 5";
} else {
    echo "less than or equal to 5";
}
?>