What is String operators?
There are two string operators available. The usage of numerical numbers might lead to unexpected outcomes:
- The PHP operator (.) is also known as the concatenation operator. It joins separate threads together.
- The PHP operator (.=) is also known as the combined assignment operator. It connects the argument to the one on the right page, on the left.
- Operator Name Example Result
.
Concatenation$txt1 . $txt2
Concatenation of$txt1
and$txt2
.=
Concatenation assignment$txt1 .= $txt2
Appends$txt2
to$txt1

Example:-
Output:-

Latest posts by Ashwani Kumar (see all)
- Top 10 DevOps Trainers in the world - October 7, 2023
- What is Cookies and Why it is Used? - May 24, 2023
- TOP trends of transitions in TikTok - May 10, 2023