diff --git a/frontend/cphp/include.misc.php b/frontend/cphp/include.misc.php index b43fe11..06533b7 100644 --- a/frontend/cphp/include.misc.php +++ b/frontend/cphp/include.misc.php @@ -98,10 +98,19 @@ function clean_array($arr) function pretty_dump($input) { ob_start(); + var_dump($input); + $output = ob_get_contents(); ob_end_clean(); - $output = nl2br(str_replace(" ", "   ", $output)); + + while(preg_match("/^[ ]*[ ]/m", $output) == 1) + { + $output = preg_replace("/^([ ]*)[ ]/m", "$1   ", $output); + } + + $output = nl2br($output); + echo($output); }