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
The above describes the array function php under a few commonly used to empty, group, debug array functions, including the contents of the array function, I hope to be interested in PHP tutorial friends helpful.