Preg match text in php between html tags

前端 未结 3 588
抹茶落季
抹茶落季 2020-11-29 06:22

Hello I would like to use preg_match in PHP to parse the \"Desired text\" out of the following from a html document

Desired text &

3条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 06:45

    preg_match("'

    (.*?)

    'si", $source, $match); if($match) echo "result=".$match[1];

提交回复
热议问题