我要匹配$str="http://localhost/discuz/post.php?action=edit&fid=3&tid=128&pid=151&page=1"
;或者$str="http://localhost/discuz/post.php?action=newthread&fid=3"要怎么得到 fid 的值啊?
;或者$str="http://localhost/discuz/post.php?action=newthread&fid=3"要怎么得到 fid 的值啊?
preg_match("/&fid=([^&]+)/",$str,$match);print_r($match[1]);
preg_match('/fid=(\d+)/',$str,$matches);
var_dump($matches);