Member Avatar

count() and sizeof() both are used for retriving size of array.
Are there more jobs that these two can do ?

Thanks

Recommended Answers

They are aliases - so the same thing.
You can also check the number of countable items in an object.
Using the recursive flag, you can count items within a multidimensional array. Useful? Dunno as it doesn't just count the lowest item of each branch.

Jump to Post

All 2 Replies

Member Avatar

They are aliases - so the same thing.
You can also check the number of countable items in an object.
Using the recursive flag, you can count items within a multidimensional array. Useful? Dunno as it doesn't just count the lowest item of each branch.

<URL SNIPPED - Advertising>

There is no another difference at all. But I suggest you to use count() – its the original name of this function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.