Functions: Update to view_array() function.

This commit is contained in:
Nate
2020-03-28 21:06:41 -06:00
parent b9fe83cd78
commit 780450919e

View File

@@ -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 "<br><pre style='text-align: left;'>".print_r($array, true).'</pre><br>';
function view_array($array, $exit = true, $return = false) {
$html = "<br><pre style='text-align: left;'>".print_r($array, true).'</pre><br>';
if ($return) {
return $html;
}
else {
echo $html;
}
$exit and exit();
}
}