Home > Article > Backend Development > PHP4 User Manual: Operators - String Operators_PHP Tutorial
String Operators
There are two string operators. The first is the concatenation operator (.), which returns the new string resulting from concatenating the right and left sides. The second is the self-joining operator (.=), which adds a string to the right of itself to form a new string. For more information, see Website Construction Server Script Class PHPPHP User Manual fancylanguage.operators.assignment.html>Assignment Operators.
$a = "Hello ";$b = $a . "World!"; // Now, $b becomes "Hello World!" $a = "Hello ";$a .= "World!"; // Now, $a becomes "Hello World!"