From 780450919e12746f3a6e7e2ee306dd4870f1e1dc Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 28 Mar 2020 21:06:41 -0600 Subject: [PATCH] Functions: Update to view_array() function. --- resources/functions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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(); } }