title: php count the number of strings after exploded
body: <p>Here is my code</p>
  
  <pre><code>&lt;?php
  
  $string = 'a|b|c|d|e|f';
  
  $tags = explode('|' , $string);
  
  
  foreach($tags as $i =&gt;$key) {
  $i &gt;0;
      echo $i.' '.$key .'&lt;/br&gt;';
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>the output is</p>
  
  <pre><code>0 a
  1 b
  2 c
  3 d
  4 e
  5 f
  </code></pre>
  
  <p>What i'm try to count the number of strings after i exploded | (it should be 6  for my example) also i need my $i to start from 1 not 0</p>
  
  <p>Any idea please ?</p>
  
  <p>Thank you.</p>