.

$result = $str1 . $str2;

.=

$str .= "World";

sprintf

$str = sprintf("name is %s %d ", $name, $age);

$name="lren";
$str = "Hello, {$name}!";

implode()函数

$array = array("Hello", "World");
$str = implode(" ", $array);