U
U
Uniq2016-02-28 22:18:35
PHP
Uniq, 2016-02-28 22:18:35

How to display results in separate DOM?

Hello everyone,
How to display the result of 1 value?
Example:
1
2
3
As I tried, but it doesn't work:
echo $val(1); - but why
echo $val(2);
tried and ($val[2]); but so rubbish it is not clear what he took.

include 'simple_html_dom.php';
$seed = 'http://';
 web_scrape($seed);

  function web_scrape($url)
{
   $data = file_get_html($url);
    //$data = new simple_html_dom();  
   // $data->load_file($url);
    $nodes = $data->find("input[type=hidden]");

    foreach ($nodes as $node) {
    $val = $node->value;
    echo $val . "<br />";
    }
  }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question