ivytony Posted March 5, 2008 Share Posted March 5, 2008 say, there is a paragraph with a about 300 words in total. I want to scan this paragraph for some exact words, e.g. name. The keywords shall be stored in an array named name_array and the value in it are the keywords like name1, name2, name3, etc. I am wondering if there is such a function for selecting keywords. Thanks Link to comment https://forums.phpfreaks.com/topic/94561-how-to-scan-a-paragraph-for-some-keywords/ Share on other sites More sharing options...
bpops Posted March 5, 2008 Share Posted March 5, 2008 I'm assuming you want to do something to these words, then you will use str_replace: http://us.php.net/manual/en/function.str-replace.php Link to comment https://forums.phpfreaks.com/topic/94561-how-to-scan-a-paragraph-for-some-keywords/#findComment-484191 Share on other sites More sharing options...
Rohan Shenoy Posted March 5, 2008 Share Posted March 5, 2008 Ig you just want to find whether a given word is found in a paragraph, you may also use strpos(). But I don't get the what you said by that array. Link to comment https://forums.phpfreaks.com/topic/94561-how-to-scan-a-paragraph-for-some-keywords/#findComment-484194 Share on other sites More sharing options...
ivytony Posted March 5, 2008 Author Share Posted March 5, 2008 that array's value will be stored in mysql. thanks Link to comment https://forums.phpfreaks.com/topic/94561-how-to-scan-a-paragraph-for-some-keywords/#findComment-484206 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.