iversonm Posted August 11, 2008 Share Posted August 11, 2008 hey i have a faily easy question as far as i know is there a function(if not how would i do it) that will look in a variable and count how many times it shows up so in example $thing="this thing loves big teddy bears it also loves to say the work loves"; lets say i want to count how many times the word "loves" comes up in $thing thanks for the help Link to comment https://forums.phpfreaks.com/topic/119222-solved-search-and-count/ Share on other sites More sharing options...
lemmin Posted August 11, 2008 Share Posted August 11, 2008 Yes, there is a function, substr_count(): http://us.php.net/manual/en/function.substr-count.php Link to comment https://forums.phpfreaks.com/topic/119222-solved-search-and-count/#findComment-614069 Share on other sites More sharing options...
iversonm Posted August 11, 2008 Author Share Posted August 11, 2008 thankyou, i figured there was a function but i couldn't find it it helps alot Link to comment https://forums.phpfreaks.com/topic/119222-solved-search-and-count/#findComment-614094 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.