PHP/regex: How to get the string value of HTML tag?

前端 未结 8 2119
忘了有多久
忘了有多久 2020-11-28 07:24

I need help on regex or preg_match because I am not that experienced yet with regards to those so here is my problem.

I need to get the value \"get me\" but I think

8条回答
  •  庸人自扰
    2020-11-28 08:06

    Try this

    $str = '
            ';
    
    preg_match_all("#([^<]+)#", $str, $foo);
    
    print_r($foo[1]);
    

提交回复
热议问题