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 Quote 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. Quote 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>'); Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.