Tutorial for String operators

What is String operators?

There are two string operators available. The usage of numerical numbers might lead to unexpected outcomes:

  1. The PHP operator (.) is also known as the concatenation operator. It joins separate threads together.
  2. 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:-

Ashwani Kumar
Latest posts by Ashwani Kumar (see all)
Tagged : / / / / / / /
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x