Prompt function in PHP which considers how many elements in an array. count() does not work.

    1 answer 1

    Hmm ... Well, since count () does not work, you will have to write your own function ...)

     function count2($a = array()) { $c = 0; foreach ($a as $t) $c++; return $c; } 

    As an option...)

    In general, count works if used correctly ...)