php simple dom parser returning "Array" -


<?php include 'simple_html_dom.php'; $url = 'http://en.wikipedia.org/wiki/myst'; $html = file_get_html($url); echo $html->find('body'); ?> 

this has been returning "array" on browser when try contents of body element

yes, because there may many elements fit selector, array of elements returned. if want first matching element, use $html->find('body', 0). described in manual: http://simplehtmldom.sourceforge.net/manual.htm


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -