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:-

Latest posts by Ashwani K (see all)
Tagged : / / / / / / /

Leave a Reply