php get a number of element in array after every foreach
<p>How to get a number of element in array after every foreach
Like </p>

<pre><code> foreach( array(20 elements in database) {
       echo $element[1];
       echo $element[2];
       echo $element[3];
       echo $element[4];
       echo $element[5];
   }
</code></pre>