Returns the number (set & not-null) elements within an (sub)array.


Syntax

array_count_real(array $array, string $subKey = null): int {


Parameter

@param array $array A 1-dimensional (or 2-dimensional) numeric or associative array.

@param string|int|null $subKey Possibility to count the values of a 2-dimensional array.


Return

Returns the number of set & not-null values. If $array is not an array or empty 0 is returned.


Examples

Yet to come...

...