dump() converts the array into array format, which is helpful for debugging function dump($vars, $label = , $return = false){
if (ini_get(html_errors)) {
$content = "
“;
";<br> }<br> $content .= htmlspecialchars(print_r($vars, true));<br> $content .= "
";
} else {
$content = $label . " :
" . print_r($vars, true);
}
if ($return) { return $content; }
echo $content;
return null;
}
array_remove_empty() removes empty elements in 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) {
array_chunk() php default function is to group functions evenly