Jump to content

[SOLVED] search and count


iversonm

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.