How do I join strings together?
That's the language lesson over. Period. In fact it's all about the period (.) or if you speak English outside of America, the stop, or full stop character.
Here's an example:
<?php
$a = "I feel";
$b = " lonely";
$isolation = $a . $b;
echo "$isolation"; // I feel lonely
?>
... and that's all there is to it, simply use the '.' between the strings that you want to join together. Note that you will need to be careful with your spacing when joining strings together if you don't want characters to appear next to each other; often therefore you'll need to include a space character in your concatenation.
Comment on this Question and Answer >>>
ASK A QUESTION
More strings PHP Questions
how to compare strings in PHP?How do I make sure a string is a certain length?
How do I extract the values of variables from a string?
How do I find the position of a letter in a string in PHP?
print(1 . " + " . 2 . " = " . 1+2 . "n"); gives answer 3 why?
