wisewood Posted June 14, 2006 Share Posted June 14, 2006 I have a string, which for example, might be this;$string = "The quick brown fox jumped over the lazy dog";I want a way to count, for example, how many times the letter "o" appears in that string.Can someone nidge me in the right direction... my brain isnt working today.SOLVED.Engaged my brain and used the substr_count() function. Quote Link to comment https://forums.phpfreaks.com/topic/11972-solved-count-the-instances-of-a-string-within-a-string/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.