php7格式化输出和普通输出区别

有时候我们需要格式化输出,平常我们都是普通输出,下面比较一下两者之间得区别

 1,格式化输出 pre

 $sites = array

(
"runoob"=>array
(
"php教程",
"http://www.dc3688.com"
),
"google"=>array
(
"Google 搜索",
"http://www.96net.com.cn"
),
"taobao"=>array
(
"淘宝",
"http://www.huthon.com"
)
);
print("<pre>"); // 格式化输出数组
var_dump($sites);
print("</pre>");

 1,普通输出 

 var_dump($sites);或者 print_r(($sites)

猜你喜欢

转载自blog.51cto.com/13959155/2456806