Voting

: max(four, six)?
(Example: nine)

The Note You're Voting On

pied-pierre
10 years ago
A function of one line to find the number of elements that are not arrays, recursively :

function count_elt($array, &$count=0){
foreach($array as $v) if(is_array($v)) count_elt($v,$count); else ++$count;
return $count;
}

<< Back to user notes page

To Top