php var_dump display problem
巴扎黑
巴扎黑 2017-05-24 11:34:23
0
6
969

I use var_dump in php to print the values ​​taken out from the database. The format is like this

;
It looks very inconvenient. Is there any way to display it like an array?
Do not add this code echo'<pre>' when outputting ;

                 echo '</pre>';
                 就能显示成这样
                 

巴扎黑
巴扎黑

reply all(6)
我想大声告诉你

Method 1: ctrl+u View source code

Method 2: Install xdebug

Method 3: Print with plug-ins such as Kint

黄舟

print_r()
Press F12 to see

PHPzhong

echo print_r($arr,true);

習慣沉默

1 The browser directly installs the jsonview plug-in.
2 Install the jq.plugin in the terminal
Use echo json_encode($val) when outputting
It looks very nice.

曾经蜡笔没有小新

View the source code
Customize the output function in the editor

我想大声告诉你

You can install an xdebug

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template