如何打印数组READABLE [英] How to print Array READABLE
本文介绍了如何打印数组READABLE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何打印可读的数组? print_r($ array);和var_dump($ array);两者都会使该$ array变得非常难看.好的,它就是这么说的,它可以打印该数组,但是我想对该数组进行一些格式正确的打印,我该怎么做?
How do i print an Array readable? print_r($array); and var_dump($array); both produce some very ugly clutter of that $array. Ok it is what it says, it prints that array, but i'd like to have some well formated print of that array, how do i do that?
推荐答案
实际上,它的格式正确,但是HTML会忽略换行符和双倍空格.
Actually, it is well-formatted but HTML ignores line breaks and double spaces.
您只需要查看页面的源代码(CTRL + U或右键单击>查看源代码)
You just have to view the page's source code (CTRL+U or right-click > view source code)
这篇关于如何打印数组READABLE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文