PHP How to concatenate the two strings
In this post we will give you information about PHP How to concatenate the two strings. Hear we will give you detail about PHP How to concatenate the two stringsAnd how to use it also give you demo for it if it is necessary.
we are going to learn about how to concatenate the two strings in PHP.
Concatenation means joining of two strings into a single string.
To concatenate the two strings, we can use the period . concatenation operator in PHP.
Here is an example:
$first = "hello ";$second = "king";$result = $first . $second ;echo $result
Output:
hello king
Similarly, we can also use .= operator in PHP.
$name = "john ";$name .= "james";echo $name
Output:
john james
Hope this code and post will helped you for implement PHP How to concatenate the two strings. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs