L
L
lexstile2019-03-18 01:31:46
Parsing
lexstile, 2019-03-18 01:31:46

Why does parsing return one element?

I'm parsing a site using simple html dom .
I use it, for some reason only one found element is returned, the first one:

$html = read($link);
foreach($html->find('a.img') as $val)
{
  pr($val->attr['href']);
}
function read($url){
......................................
  return str_get_html($result);
}

As I understood, find should return an array of all found elements...

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