How to search a word in text file.
I want to search a word from a text file.
e.g search word:- hello, hi welcome to php
Search is separated by comma or by space.
Consider there is one directory that contain many files and i want to search that word in every file. if "hello hi welcome to php" words found in these file not continuously .The result will show the link to these file. when user will click on these file it will show the contain (Search word will be shown in different color like in yellow color).
File may contain these word (HELLO HI WELCOME to Php) in capital but still i want to show the result .
Result will show the links to these file ..
<input type=text name=txtSearch id=idSearch><input type=button value=SEARCH onclick='search(idSearch.value);'>
When user will click on these link then file contain will be show to user . These search word will be shown in different color (like in yellow color).