1zeus1 Posted November 17, 2012 Share Posted November 17, 2012 or this error : Fatal error: Call to a member function find() on a non-object in C:\xampp\htdocs\b\a\v.php on line 6 in this code: <?php include('simple_html_dom.php'); $html = '<span class="st">svsv</span>'; ///////////////////////// foreach($html->find('span.st') as $c) $cc= $c -> plaintext . '-'; ?> can someone help me regards Link to comment https://forums.phpfreaks.com/topic/270826-php-simple-html-dom-parser/ Share on other sites More sharing options...
requinix Posted November 17, 2012 Share Posted November 17, 2012 You're missing the part that takes the HTML string and turns it into an object. Right now $html is just a string - you can't call methods on it. Link to comment https://forums.phpfreaks.com/topic/270826-php-simple-html-dom-parser/#findComment-1393169 Share on other sites More sharing options...
1zeus1 Posted November 17, 2012 Author Share Posted November 17, 2012 solved, thanks Gurus $html = str_get_html('<span class="st">svsv</span>'); Link to comment https://forums.phpfreaks.com/topic/270826-php-simple-html-dom-parser/#findComment-1393179 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.