function ga_push_clean_empty_array_tail in GA Push 7
Same name and namespace in other branches
- 8 ga_push.module \ga_push_clean_empty_array_tail()
Recursive function to delete last empty array entries.
Parameters
array $array: Array to filter.
Return value
array Filtered array.
1 call to ga_push_clean_empty_array_tail()
- ga_push_method_ga_js_push in inc/
ga_push.ga_js.inc - Send the ga push to JS on page load.
File
- ./
ga_push.module, line 962 - Drupal Module: GA Push.
Code
function ga_push_clean_empty_array_tail($array) {
if (count($array)) {
$last_elem = end($array);
if ($last_elem == '') {
array_pop($array);
$array = ga_push_clean_empty_array_tail($array);
}
}
return $array;
}