Snippets


/**
* Determine whether a multi-dimensional array is considered to be empty.
* 
* @author kleingeist
* @param mixed $mixed Array or variable to be checked.
* @return bool Returns FALSE if mixed has a non-empty and non-zero value. 
* @link http://php.net/manual/en/function.empty.php
*/
function array_empty($mixed) {
  if (is_array($mixed)) {
    foreach ($mixed as $value) {
      if (!array_empty($value)) {
        return false;
      }
    }
  }
  elseif (!empty($mixed)) {
    return false;
  }
  return true;
}

Stoppt die Vorratsdatenspeicherung! Jetzt klicken & handeln!Willst du auch bei der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien: