This is html text in the website, i want to grab
1,000 Places To See Before You Die
-
Use plaintext
instead.
echo $e->plaintext;
But still the year will be present which you can trim off using regexp.
Example from the documentation here:
$html = str_get_html("foo bar");
$e = $html->find("div", 0);
echo $e->tag; // Returns: " div"
echo $e->outertext; // Returns: " foo bar"
echo $e->innertext; // Returns: " foo bar"
echo $e->plaintext; // Returns: " foo bar"