How does the concatenation operator interact with the ternary operator in PHP?

When using the concatenation operator (.), the ternary operator can be used within the concatenation to conditionally concatenate different strings based on a certain condition. To achieve this, simply place the ternary operator inside the concatenation expression. Example:

// Using the ternary operator within the concatenation operator
$string = "Hello, " . ($isUserLoggedIn ? "User" : "Guest") . "! Welcome to our website.";
echo $string;