Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 199912

Re: [PHP4BETA] count() vs. sizeof() From: Lars Torben Wilson (torben <email protected>)
Date: 12/31/99

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 <email protected>>                     Netmill iTech|
|http://www.coastnet.com/~torben            http://www.netmill.fi|
|Ph: 1 250 383-9735                             torben <email protected>|
+----------------------------------------------------------------+

-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe <email protected> For additional commands, e-mail: php4beta-help <email protected> To contact the list administrators, e-mail: php4beta-admin <email protected>