Simple dom double find () parser not working?
Above is my DOM and I expect to get 4 hours ago but I got the error
Fatal error: Call to a member function find() on a non-object
My php looks like this
$time_ago = $html->find('.entry .unvoted',0)->find('.tagline .live-timestamp',0)->plaintext;
echo $time_ago;
I know I could work with one find () that would find('tagline .live-timestamp')
, but I'm wondering why double find () doesn't work.
+3
source to share