在PHP中可以指定多行的字符串,在引号之间的字符串文字中插入换行符:
示例代码
$myString = "
test:
test;
test
Line 1
Line 2
....
Line - n
";
echo $myString;
执行上面示例代码,得到以下结果:
test:
test;
test
Line 1
Line 2
....
Line - n
在PHP中可以指定多行的字符串,在引号之间的字符串文字中插入换行符:
示例代码
$myString = "
test:
test;
test
Line 1
Line 2
....
Line - n
";
echo $myString;
执行上面示例代码,得到以下结果:
test:
test;
test
Line 1
Line 2
....
Line - n