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 do I reverse a string in PHP?How do I remove space from the start of a PHP string?
Hello, Is it possible to specify a character-encoding in the filter_var function. Thank you for your reply, Jan
How do I turn a string into an array?
How can I repeat a string variable several times?
