Home  >  Article  >  php教程  >  php连接符. 和参数间隔符,的说明

php连接符. 和参数间隔符,的说明

WBOY
WBOYOriginal
2016-06-13 10:53:352280browse

在 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