<?
  function countNulls($array)
  {
    if (!is_array($array)) {
      return(NULL);
    }
    reset($array);
    $count=0;
    while(list(,$val)=each($array)) {
      if ($val===NULL) {
        $count++;
      }
    }
    return($count);
  }
?>

Aris Santillan wrote:

hi

how to count null values in an array?

tnx


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to