Re: Parsing html documents.
| From: | Christoph Grottolo | Date: | Sun, 19 Jan 2003 15:44:37 +0000 |
| Subject: | Re: Parsing html documents. | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-17973@lists.php.net to get a copy of this message | ||
tyler@sunergize.com wrote:
>Is there a way, I can read a html document, look for a <br> tag, print what
>it finds, and stop when it finds the next <br>. If possible I would like to
>do this for the entire document. For example:
>
>Tyler Mace
$html_array=explode('<br>',implode('',file('myfile.html','r')));
file() -> reads the file into an array
implode() -> puts the array into a string (in this case with an empty
separator)
explode() -> divides the string into an array at every occurence of
'<br>'
HTH
Christoph