Simple html dom find class
I am just starting with the mentioned Parser and somehow running on problems directly with the beginning. Show Referring to this tutorial: http://net.tutsplus.com/tutorials/php/html-parsing-and-screen-scraping-with-the-simple-html-dom-library/ I want now simply find in a sourcecode tne content of a div with a class ClearBoth Box I retrieve the code with curl and create a simple html dom object:
Then I wanted to add the content of the div into an array called divs:
But now, when I print_r the $divs, it gives much more, despite the fact that the sourcecode has not more inside the div. Like this:
I do not understand why the $divs has not simply the code from the div? Here is an example of the source code at the site:
What am I doing wrong? Finding elements by tag name
Finding elements by class name or id
Finding elements by attribute
|