get complete 'div' content using class name or id using php

后端 未结 3 1511
臣服心动
臣服心动 2020-12-18 16:21

i got a page source from a file using php and its output is similar to

3条回答
  •  心在旅途
    2020-12-18 16:35

    I'm not sure what you asking but this might be it

    preg_match_all("
    (.*?)
    ", $htmlsource, $output);

    $output should now contain the inner content of that div

提交回复
热议问题