Dump () takes an array of arrays in array format, which is useful for debugging
function dump ($vars, $label = ", $return = False) {
if (Ini_get (' html_errors ')) {
$content = "
$content. = "{$label}:
$content. = "\ n
\ n ";
} else {
$content = $label. ": \ n". Print_r ($vars, true);
}
if ($return) {return $content;}
Echo $content;
return null;
}
Array_remove_empty () removes empty elements from the array
Function Array_remove_empty (& $arr, $trim = True) {
foreach ($arr as $key = = $value) {
if (Is_array ($value)) {
Array_remove_empty ($arr [$key]);
} else {
$value = Trim ($value);
if ($value = = ") {
Unset ($arr [$key]);
} elseif ($trim) {
$arr [$key] = $value;
}
}
}
}
Array_chunk () PHP default function is to group functions evenly
http://www.bkjia.com/PHPjc/319779.html www.bkjia.com true http://www.bkjia.com/PHPjc/319779.html techarticle dump () is useful for debugging function dump ($vars, $label = ', $return = False) {if (Ini_get (' html_errors ')) {$content = "for the array in array format) Pre\n "; if ($label! = ") {$co ...