Please give me some advice, what is the difference between print, print_r and echo in php? -PHP Chinese website Q&A-Please give me some advice. What are the differences between print, print_r, and echo in PHP? -PHP Chinese website Q&A
Please watch and learn.
echo是PHP语句, print和print_r是函数,语句没有返回值,函数可以有返回值print() 只能打印出简单类型变量的值(如int,string) print_r() 可以打印出复杂类型变量的值(如数组,对象) echo 输出一个或者多个字符串
Please give me some advice, what is the difference between print, print_r and echo in php? -PHP Chinese website Q&A-Please give me some advice. What are the differences between print, print_r, and echo in PHP? -PHP Chinese website Q&A
Please watch and learn.
echo是PHP语句, print和print_r是函数,语句没有返回值,函数可以有返回值
print() 只能打印出简单类型变量的值(如int,string)
print_r() 可以打印出复杂类型变量的值(如数组,对象)
echo 输出一个或者多个字符串