Home  >  Q&A  >  body text

When curl collects web page data, preg_match_all() in the for loop can only obtain the first two pieces of data.

1.png2.png

get() can get the data. When you get to preg_match_all, you can only get the first two items. The rest will show that there is no record yet. If you modify $i Starting from the third item, only the first two are obtained, so the third item has data, but preg_match_all cannot be obtained in the loop

Amy_烊Amy_烊2187 days ago889

reply all(1)I'll reply

  • Amy_烊

    Amy_烊2018-11-16 10:14:52

    Various great gods have appeared, please help analyze it. Baidu and Google can’t find similar problems, so it’s helpful for the time being

    reply
    0
  • Cancelreply