在PHP中拼接两个字符串
PHP offers different kinds of operators having distinctive functionalities. Operators enable us to perform arithmetic activities, string concatenation, compare values and to perform boolean operations, more...In this article, we will learn string operators given by PHP. Let's first learn the types of string operators in php. There are two string operators provided by PHP.
1.Concatenation Operator ("."):
This operator combines two string values and returns it as a new string.
2.Concatenating Assignment operator (".="):
This operation attaches the argument on the right side to the argument on the left side.
Let's demonstrate the utility of the above operators by following examples.
Example:
登录后复制