A period (.) character is used to combine two separate variables into a single string : String Concatenation « String « PHP






A period (.) character is used to combine two separate variables into a single string

 
<?php
    $string = "Thank you for buying ";
    $newstring = $string . "my book!";
?>
  
  








Related examples in the same category

1.A string and an integer value are added, and the result is an integer value.
2.Combining a string and a number
3.Concatenating strings together
4.Concatenation operator ('.')
5.Joining and Disassembling Strings