且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

检索链接值形式< a href>使用PHP标记

更新时间:2023-02-18 14:17:51

$url = '<a title="Question" href="http://***.com/questions/ask"></a>';
preg_match("/href=\"(.*?)\"/i", $url, $matches);
print_r($matches);
/*
Match Group(s) :
        1.  http://***.com/questions/ask
*/