Here is my code
<?php
$string = 'a|b|c|d|e|f';
$tags = explode('|' , $string);
foreach($tags as $i =>$key) {
$i >0;
echo $i.' '.$key .'</br>';
}
?>
the output is
0 a
1 b
2 c
3 d
4 e
5 f
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
Any idea please ?
Thank you.
count()
items in an array? – Tangleberry