How can I print an arrangement in an understandable way? PHP

-1

When I use print_r($arreglo) I print everything on top, is there any way to order that?

    
asked by Ivan Koop 25.07.2016 в 15:20
source

1 answer

2

Hello Try with this option print("<pre>" . print_r($arreglo, true) . "</pre>");
what I usually do is put it in a function so I can later reuse it

function print_p($arreglo) {
    print("<pre>" . print_r($arreglo, true) . "</pre>");
}

Then you just call it in your code and ready print_p( $arreglo_de_matrices_u_objeto )

    
answered by 25.07.2016 / 19:06
source