-
Notifications
You must be signed in to change notification settings - Fork 14
count
Chung Leong edited this page Jan 10, 2022
·
5 revisions
count - Returns the number of elements in an array.
uint32 count( mixed $var [, int32 $mode = COUNT_NORMAL] )
var - The array.
mode - If the optional mode is set to COUNT_RECURSIVE or true, count() returns the total number of primitives (i.e. integers or floats) contained in a multidimensional array.
Returns the number of elements in var. If var is a multidimensional array and mode == COUNT_NORMAL, the return value is the number of subarrays. If mode == COUNT_RECURSIVE, it is the total numbers of primitives.
No action actually occurs when you call this function. count() merely returns variables holding an array’s dimensions.
1.0 and above.