diff --git a/resources/functions.php b/resources/functions.php index 820b79a6d7..84f6495b9f 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1945,8 +1945,14 @@ function number_pad($number,$n) { //output pre-formatted array keys and values if (!function_exists('view_array')) { - function view_array($array, $exit = true) { - echo "
".print_r($array, true).'

'; + function view_array($array, $exit = true, $return = false) { + $html = "
".print_r($array, true).'

'; + if ($return) { + return $html; + } + else { + echo $html; + } $exit and exit(); } }