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# - SharpSVN - How to get the previous revision? -

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

url - Querystring manipulation of email Address in PHP -