标签:
echo "a","b","c"; echo ("a"),("b"),("c"); echo ("a","b","c");//错误 echo "a"."b"."c"
点号是将一个一个字符串连接起来,然后输出最终连接的结果
逗号是按顺序输出,没有字符串的拼接操作,所以速度快
echo是一个语言结构,不是一个函数,不能像给函数传参一样echo("a","b","c");
<?php print "acd"."sdf"; print "acd","sdf";//错误 ?>
echo能输出多个字符串,而print只能输出一个字符串
<?php print_r(23);//23 print_r(array("a"=>1,"b"=>2)); ?>
Array ( [a] => apple [b] => banana [c] => Array ( [0] => x [1] => y [2] => z ) )
print_r(array("a"=>1,"b"=>2),true);//不输出结果,会将结果返回
标签:
原文地址:http://www.cnblogs.com/pmx-pmx/p/4956158.html