推荐:《PHP视频教程》
php把空格替换成换行符
代码如下:
$str = 'a b c'; // 空格替换成换行符(\n) $str = str_replace(' ', "\n", $str); // 显示字符 echo $str;