if I have a string something like this:
$string = '01122028K,02122028M,03122028K,04122028M,05122028K,06122028P-2,07122028K,08122028P-';
How can I do to get the number of 'K' inside string $string. In this case K would be 4. I know it can be solved by the help strpos() through out the looping after explode the $string into array. Is any php function to do it in straightforward way?
Thank you.
See Question&Answers more detail:os