preg_match get multiple

前端 未结 2 399
慢半拍i
慢半拍i 2021-01-27 01:11

I have a page like w/e more HTML I need to grab all the data between the tags and not the first one. Currently I use

/\"


        
相关标签:
2条回答
  • 2021-01-27 01:44

    Look into the function preg_match_all.

    0 讨论(0)
  • 2021-01-27 02:03

    use this with preg_match_all()

    preg_match_all("/<?php([^<]*?)\?>/siU",$html,$output);
    print_r($output[1]);
    
    0 讨论(0)
提交回复
热议问题