echo 和 print 区别
echo可以输出一个或多个字符串;
<?php echo "This","string","with"; //输出This string with ?>
print只允许输出一个字符串,返回值为1;
<?php print "This","string","with"; //报错 print "this string" //输出this string只能输出一个字符串 ?>
博客列表 >PHP echo和print语句
echo 和 print 区别
echo可以输出一个或多个字符串;
<?php echo "This","string","with"; //输出This string with ?>
print只允许输出一个字符串,返回值为1;
<?php print "This","string","with"; //报错 print "this string" //输出this string只能输出一个字符串 ?>