PHP中字符串的连接使用点,不是加号。换行\n需要用双引号括起来,不能用单引号。

eg.

<?php

print_r("hello"."\n");

print_r("world"."\n");

print_r('hello'.'world'."\n");

?>

结果:

hello

world

hello world

posted on 2016-04-15 23:06  小鹿BAMBI  阅读(3984)  评论(0)    收藏  举报