function _radioactivity_prune_array in Radioactivity 6
Same name and namespace in other branches
- 5 radioactivity.module \_radioactivity_prune_array()
1 call to _radioactivity_prune_array()
File
- ./
radioactivity-admin-ui.inc, line 244 - Radioactivity core admin UI.
Code
function _radioactivity_prune_array($energy) {
$ret = array();
if (isset($energy) && count($energy)) {
foreach ($energy as $key => $value) {
if (is_array($value)) {
$value = _radioactivity_prune_array($value);
}
if ($value || !is_array($value) && strlen($value)) {
$ret[$key] = $value;
}
}
}
return $ret;
}