Concatenating strings together : String Concatenation « String « PHP






Concatenating strings together

 
<?php
$my_string = "Hello Max. My name is: ";
$newline = "<br />";
echo $my_string . "Paula" . $newline;
echo "Hi, I'm Max. Who are you? " . $my_string . $newline;
echo "Hi, I'm Max. Who are you? " . $my_string . "Paula";

?>
  
  








Related examples in the same category

1.A period (.) character is used to combine two separate variables into a single string
2.A string and an integer value are added, and the result is an integer value.
3.Combining a string and a number
4.Concatenation operator ('.')
5.Joining and Disassembling Strings