Date: Wed, 13 Aug 2003 08:56:53 -0700 (PDT)
   From: David Byrne <[EMAIL PROTECTED]>

   How can I count empty values in an array?  This count
   should not include zeros or non-empty values.

This should work:

           if (length($value) == 0) {
               $count += 1;
           }

$value has length zero if it is "" or undef.
"0" has length 1.

--kag
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to