Basic PHP Programming Question:
How To Concatenate Two Strings Together in PHP?
Answer:
You can use the string concatenation operator (.) to join two strings into one. Here is a PHP script example of string concatenation:
<?php
echo 'Hello ' . "world! ";
?>
This script will print:
Hello world!
<?php
echo 'Hello ' . "world! ";
?>
This script will print:
Hello world!
Previous Question | Next Question |
How To Assigning a New Character in a String using PHP? | How To Compare Two Strings with Comparison Operators in PHP? |