Hi,
I am looking to transfer content of hundreds of html files into a database. I need to search each html file for every occurrence of a link, image if there is one present, alt text and anchor text. It should then be placed in several variables $link, $src, $alt, $anchor and placed into a csv file so I can import it into a database. The only thing that I have done so far is read the contents of the html file into a string.
<a href="link.htm" target="_blank"><img border="0" src="example.jpg" alt="This is an example"><br>This is an example</a></td>
So in this example, I need to retrieve link.htm, example.jpg, 'This is an example', and 'This is an example'.
How would I go about doing that?
Thanks for the help