Re: text file parsing
| From: | Luis Ferro | Date: | Fri, 25 Oct 2002 00:50:08 +0000 |
| Subject: | Re: text file parsing | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-16539@lists.php.net to get a copy of this message | ||
Bryan Luisana wrote:
Hello, I have only been working with php for about 2 hours now so bare with me if I type something stupid. I am trying to open up a remote text file, parse the file, and output the parsed text as html. As of now I can open the file read characters into a buffer and then output them as html. My problem is with parsing the buffer to get to the text I want to output. Should I read the entire file into an array? Then output the parts of the array I want to show? If so please post some type of example code. Read the whole file to a single variable and then use regexp (ereg for instance [there is a regexp like function in php that gives you the starting position of the text... ereg will give you the found item...) to find the piece of text that you want...Cheers... Luis Ferro --- [This E-mail scanned for viruses by Declude Virus]