d.shankar Posted August 14, 2007 Share Posted August 14, 2007 I have a simple query for you. I have this string $str="this is monday and tommoro is tuesday this is"; in this i have to find the occurence of certain word , if i choose "is" then result is 3 , if i choose "this" the result is 2. please note that the string may be dynamic !! I have tried str_word_count and others but still ... :'( Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 14, 2007 Share Posted August 14, 2007 then place a variable in the place where you are putting 'this' or 'is' and set it using your flow logic before calling the function. Quote Link to comment Share on other sites More sharing options...
d.shankar Posted August 14, 2007 Author Share Posted August 14, 2007 Dont we have any functuion to achieve that ? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 14, 2007 Share Posted August 14, 2007 preg_match Quote Link to comment 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.