total no of occurances in string php

Solutions on MaxInterview for total no of occurances in string php by the best coders in the world

showing results for - "total no of occurances in string php"
Mattheo
11 Mar 2018
1$str = "cdcdcdcdeeeef";
2echo substr_count($str, 'c'); 
3
4
5//please note needle is case sensitive