Complete the code to concatenate two strings using the correct operator.
<?php $greeting = "Hello" [1] " World!"; echo $greeting; ?>
In PHP, the dot . operator is used to join (concatenate) strings.
Complete the code to join the variables $first and $last into $fullName.
<?php $first = "John"; $last = "Doe"; $fullName = $first [1] $last; echo $fullName; ?>
The dot . operator joins two strings stored in variables.
Fix the error in concatenating $a and $b with a space between them.
<?php $a = "Good"; $b = "Morning"; $result = $a [1] " " [2] $b; echo $result; ?>
Use the dot . operator to concatenate multiple strings and variables.
Fill both blanks to concatenate $city and $country with a comma and space between.
<?php $city = "Paris"; $country = "France"; $location = $city[1] ", " [2] $country; echo $location; ?>
Use the dot . operator to join strings and literals.
Fill all three blanks to build a greeting with $name and $day.
<?php $name = "Alice"; $day = "Monday"; $message = "Hello, "[1] $name [2] "! Today is " [3] $day; echo $message; ?>
Use the dot . operator to join all parts of the greeting string.
