Thomisback Posted June 1, 2008 Share Posted June 1, 2008 Hi, I'm trying to grab the values of some links, the problem is that it only gives me the first link. I want all the links. The code if (preg_match('%<br><br></TD><TD width="120" align="center" valign="top"><A href="(.*?)">%', $data, $regs)) { $type = $regs[1]; } else { $type = ""; } I already tried a foreach statement but still only returns 1 value. Thanks Link to comment https://forums.phpfreaks.com/topic/108233-solved-link-grabber/ Share on other sites More sharing options...
joquius Posted June 1, 2008 Share Posted June 1, 2008 preg_match_all ($pat, $str, $matches) matches are returned in the format of $matches[sub pattern index] = sub pattern matches Link to comment https://forums.phpfreaks.com/topic/108233-solved-link-grabber/#findComment-554798 Share on other sites More sharing options...
Thomisback Posted June 1, 2008 Author Share Posted June 1, 2008 Thanks i'm going to have a look at it Link to comment https://forums.phpfreaks.com/topic/108233-solved-link-grabber/#findComment-554803 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.