Combining Multiple Strings into One in PHP


Concatenate multiple strings using the dot . operator.

Source Code

$hello = "Hello";
$world = "World";
$message = $hello . ", " . $world . "!";
echo $message; // Outputs: Hello, World!
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments