echo (PHP 3, PHP 4 )echo -- Output one or more strings Description void echo ( string arg1 [, string argn...]) Outputs all parameters. echo() is not actually a function (it is a language construct) so you are not required to use parentheses with it. In fact, if you want to pass more than one parameter to echo, you must not enclose the parameters within parentheses. /////////////////////////////////////////////////////////////print (PHP 3, PHP 4 )print -- Output a string Description int print ( string arg) Outputs arg. Returns 1, always. print() is not actually a real function (it is a language construct) so you are not required to use parentheses with its argument list.
print 有返回值,,,,echo 无返回值
(PHP 3, PHP 4 )echo -- Output one or more strings
Description
void echo ( string arg1 [, string argn...])
Outputs all parameters. echo() is not actually a function (it is a language construct) so you are not required to use parentheses with it. In fact, if you want to pass more than one parameter to echo, you must not enclose the parameters within parentheses. /////////////////////////////////////////////////////////////print
(PHP 3, PHP 4 )print -- Output a string
Description
int print ( string arg)
Outputs arg. Returns 1, always. print() is not actually a real function (it is a language construct) so you are not required to use parentheses with its argument list.
echo的使用格式是:
echo "$str_1,$str_2,...,$str_3";
使用上最灵活,也最常用。
而print的使用格式是:
print ($str);
用法和echo大体相同。
echo $test 如果是数组的话,只能出现Array所以,在数组情况下,使用print
一般情况下,使用echo
呵,个人这么用
print 是 来源C
其实都无所谓拉
我都用 echo "";