(.+?)#'; $fbuf = file_get_contents('http://digg.com/view/technology/upcoming/most'); preg_match_all($match, $fbuf, $matches); //1 offset links / 2 offset titles foreach($matches[1] as $key => $value) echo $matches[2][$key], ' - ', $value, "\n"; ?>