This question already has an answer here:
How to count only (-) in string using php ?
normally i usually use below code to count all char length in string using php
$count = mb_strlen( $string );
But i want to know how can i count only dash sign (-)
in string using php ?
EG:
$string = "1-2-3-4-5-";
after count dash sign (-)
result will be 5
</div>