Re: [PHP4BETA] count() vs. sizeof()
| From: | Lars Torben Wilson | Date: | Fri, 31 Dec 1999 08:17:52 +0000 |
| Subject: | Re: [PHP4BETA] count() vs. sizeof() | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-8743@lists.php.net to get a copy of this message | ||
Rolle, Ted writes:
> It seems as though these both return the same value; I need the
> number of filled and blank-filled elements in an array. Is there an
> easy, elegant way to do this in PHP?
sizeof() is an alias for count(). Until PHP4, I think you'll need to
just loop and count.
In PHP4 you'll have various new array functions which would make this
sort of thing easier; they're already in the manual.
Cheers,
Torben
--
+----------------------------------------------------------------+
|Torben Wilson <torben@php.net> Netmill iTech|
|http://www.coastnet.com/~torben http://www.netmill.fi|
|Ph: 1 250 383-9735 torben@netmill.fi|
+----------------------------------------------------------------+