note 40880 added to function.count
| From: | cparker at NEINSPAMwrack dot org | Date: | Wed, 17 Mar 2004 23:35:15 +0000 |
| Subject: | note 40880 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66992@lists.php.net to get a copy of this message | ||
didn't find a native php function for this so i made my own.
function count_array($input)
{
return (is_array($input)) ? count($input) : false ;
}
i had to make this because one of my functions returned an array or false. when it returned false
(count(false) == 1) so my check would fail and thus cause an error.
----
Manual Page -- http://www.php.net/manual/en/function.count.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40880
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40880&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40880&report=yes
Search -- http://master.php.net/manage/user-notes.php