Home >Backend Development >PHP Tutorial >PHP4 User Manual: Operators - String Operators_PHP Tutorial

PHP4 User Manual: Operators - String Operators_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:22:18939browse


String Operators
There are two string operators. The first is the concatenation operator (.), which returns the new string resulting from concatenating the right and left sides. The second is the self-joining operator (.=), which adds a string to the right of itself to form a new string. For more information, see Website Construction Server Script Class PHPPHP User Manual fancylanguage.operators.assignment.html>Assignment Operators.
$a = "Hello ";$b = $a . "World!"; // Now, $b becomes "Hello World!" $a = "Hello ";$a .= "World!"; // Now, $a becomes "Hello World!"

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532343.htmlTechArticleString operators There are two string operators. The first is the concatenation operator (.), which returns the new string resulting from concatenating the right and left sides. The second one is the self-join operator (.=), which is...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn