this is what I have right now:
$text = "test";
$count = substr_count($text, "Hello Everyone this is a
test test test that im testing");
the value $count is 4. I would like to say 3 instead because the word testing is not the same as test.
I am open to doing this using regular expressions if its better/easier ?
any suggestions please
Use the word boundary escape sequence
\binpreg_match_all():See also: Escape sequences