Hello everyone!
I've been using this simple html parser here: http://simplehtmldom.sourceforge.net/, yes, its working like selecting all the divs with specified id's,but my question is, how about if i'm gonna include to show and select the tags like: <head> </head>, <div> </div>.

Any idea how to do this?

Thanks :)

Look the source code of the page you are interested in. Let's say that the DIV you are interested in is the THIRD in the page's HTML source code (but it has no attributes - id, class, etc).

Since you know it is the third, then you can get it by issuing find('div', 2) . The first DIV would be on index zero; the second in index one, etc.

This article has been dead for over six months. Start a new discussion instead.