<?php
// PHP 中字符串连接使用点号 (.)
$string1 = "Hello";
$string2 = "World";
$result = $string1 . " " . $string2;
echo $result; // 输出: Hello World
// 解释说明:
// 在 PHP 中,字符串连接符是点号 (.)。
// 上面的代码中,$string1 和 $string2 是两个字符串变量,
// 使用 . 连接它们,并在中间加上一个空格,最终输出结果为 "Hello World"。
?>
上一篇:php __call
下一篇:php date函数
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站