PHP4 User Manual: Operator -> String Operator

zhaozj2021-02-08  200

String operator

There are two string operators. The first is the connection operator ('.'), It returns a new string generated after the right side and left. The second is the self-connect operator ('. ='), Which is a new string that is formed in the right side of the string. See Assignment Operators for more information.

$ a = "hello";

$ b = $ a. "World!"; // Now, $ b became "Hello World!"

$ a = "hello";

$ a. = "world!"; // Now, $ A became "Hello World!"

转载请注明原文地址:https://www.9cbs.com/read-3434.html

New Post(0)