How to Concatenate Strings in PHP
Posted on: March 03, 2021 by Ariessa Norramli
In this article, you will learn how to concatenate strings in PHP.
Let’s say you have 2 string variables.
$a = "Codesource.io is ";
$b = "fun";
Concatenate Strings
In order to concatenate strings, you can use the concatenation operator, .
$a = "Codesource.io is ";
$b = "fun";
echo "$a" . "$b";
// Codesource.io is fun
Note: The concatenation operator, .
functions by concatenating its left and right arguments.
Share on social media
//