在 PHP 中,只有一个字符串运算符,并置运算符 (.) 用于把两个字符串值连接起来。
要把两个变量连接在一起,请使用这个点运算符 (.) :
例子:
1
2
$txt1="Hello World";
3
$txt2="1234";
4
echo $txt1 .' ' . $txt2;
5
?>
用.和,是相同的结果; PHP是一个语法宽松的语言,数组参数等用,参数间隔符,
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