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