note 35961 rejected from function.array-count-values by pollita
| From: | pollita@php.net | Date: | Sun, 21 Sep 2003 02:26:16 +0000 |
| Subject: | note 35961 rejected from function.array-count-values by pollita | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56836@lists.php.net to get a copy of this message | ||
Note Submitter: sarok@phreaker.net
----
As programmer at bardware dot de is saying, the function will also count empty keys. But its a much
easier way to tell if the keys are empty or not. Example:
$i = '0';
foreach ($array as $value) {
if ($value != FALSE) {
$i++;
}
}
echo $i;