Guest aceooo2 Posted March 13, 2007 Share Posted March 13, 2007 Hi all, Again I have made several attempts to seek the answer from here and other web/books. But what Im trying to do is actually have a user enter some text and click on search. This will search an html file (with several paragraphs of infromation in,), with all possible matches and show up on a new page with all possible matches. I can do searches but only in fixed circumstances and not looking into a file. The HTML page has something like html//fieldset/ Fieldsets A fieldset blahblah.... Link to comment https://forums.phpfreaks.com/topic/42494-searching-a-file/ Share on other sites More sharing options...
Orio Posted March 13, 2007 Share Posted March 13, 2007 First, read the file (using file_get_contents() or by another file function). Then search for whatever you want using regular expressions (preg_match_all() may assist you for an example) or php's string functions. Orio. Link to comment https://forums.phpfreaks.com/topic/42494-searching-a-file/#findComment-206175 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.