How can I format (fairly print) a multidimensional array for debugging?

I saw some pretty printed modules for code. Does anyone know one that will format a multidimensional array onto a readable display?

Example, translate this:

array (83) {[0] => array (2) {["name"] => string (11) "CE2 Options" ["type"] => string (5) "title"} [1] => array (1) {["type"] => string (4) "open"} [2] => array (5) {["name"] => string (8) "Template" ["desc"] = > string (638) "test description" ["id"] => string (9) "my_theme" ["type"] => string (14) "selectTemplate" ["options"] => array (13) {

In that...

array(83) { 
    [0]=> array(2) { ["name"]=> string(11) "My Options" ["type"]=> string(5) "title" } 
    [1]=> array(1) { ["type"]=> string(4) "open" } 
    [2]=> array(5) { 
        ["name"]=> string(8) "Template" 
        ["desc"]=> string(638) "Test description" 
        ["id"]=> string(9) "my_theme" 
        ["type"]=> string(14) "selectTemplate" 
        ["options"]=> array(13) { 
            [0]=> string(10) "test" 
+3
3

, var_dump, , :
/ Var_dump PHP?

http://krumo.sourceforge.net/ DHTML . ( include(), .)

html, script.

+3

HTML-,

<pre></pre>

.

+7

- , , XDebug, html_errors . var_dump ($ array). , , .

+2

Source: https://habr.com/ru/post/1791018/


All Articles