Moptop650 Posted February 9, 2007 Share Posted February 9, 2007 Is there a function (or combination of functions) that would count the number of occurrences of a string in another string? Example: $words="Blah blah allah"; $occurrences=thatfuncton($words, "a"); echo $occurrences; Which would echo '4' because 'a' appears in $words 4 times. Link to comment https://forums.phpfreaks.com/topic/37691-string-occourance-funtion/ Share on other sites More sharing options...
boo_lolly Posted February 9, 2007 Share Posted February 9, 2007 there are plenty. read the manual Link to comment https://forums.phpfreaks.com/topic/37691-string-occourance-funtion/#findComment-180297 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.