PHP String Operators - String Operators in PHP
PHP String Operators
- PHP String Operators are operators used in PHP to manipulate strings. These operators are used to concatenate, compare, calculate the length of a string, and search for substrings.
- The PHP String Operators are:
- . (concatenation)
- .= (concatenation assignment)
Operator | Name | Syntax | Operation |
---|---|---|---|
. | Concatenation | $a.$b | Concatenated $a and $b |
.= | Concatenation and assignment | $a.=$b | First concatenates then assigns, same as $a = $a.$b |