]*>(.*?)<\/b><\/a>([^\r\n]*)/', $contents, $output, PREG_SET_ORDER );

  foreach ($output as $item) {
   $filepath = str_replace("/", "\\", $item[1]);
   if (!strstr($filepath, '\\')) {
     $filepath = $filepath . "\\index.asp";
   } elseif (!strstr($filepath, '.asp')) {
     $filepath = $filepath . "index.asp";
   }
   if (fopen("G:\\WEB\\" . $filepath, "r")) {
     $category[$i][] = $filepath;
     $title[$i][] = $item[2];
     $introText[$i][] = $item[3];
   }
}

// go back thru and add in the titles that weren't bold
  preg_match_all('/
  • ]*>(?!)(.*?)(?!<\/b>)<\/a>/', $contents, $output, PREG_SET_ORDER ); foreach ($output as $item) { $filepath = str_replace("/", "\\", $item[1]); if (!strstr($filepath, '\\')) { $filepath = $filepath . "\\index.asp"; } elseif (!strstr($filepath, '.asp')) { $filepath = $filepath . "index.asp"; } if (fopen("G:\\WEB\\overclockers\\" . $filepath, "r")) { $category[$i][] = $filepath; $title[$i][] = $item[2]; } } } // get article content for($i = 0 ; $i < count($category) ; $i++) { for($j = 0 ; $j < count($category[$i]) ; $j++) { $filename = "G:\\WEB\\overclockers\\" . $category[$i][$j]; $file = fopen($filename,"r") or exit("Unable to open " . $filename . "! "); $contents = fread($file, filesize($filename)); fclose($file); preg_match_all('/<[bi]>"(.*?)"/', $contents, $output1, PREG_SET_ORDER ); preg_match_all('/([a-zA-Z0-9, ]*)[-<\s]/', $contents, $output2, PREG_SET_ORDER ); preg_match_all('/[^-]*[- ]{1,2}([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{2,4})[<\s]/', $contents, $output3, PREG_SET_ORDER ); foreach ($output1 as $item) { $main[$i][$j][0] = $item[1]; // title_alias } foreach ($output2 as $item) { $main[$i][$j][1] = $item[1]; // created_by_alias } foreach ($output3 as $item) { $date = (!empty($item)) ? date('Y-m-d H:i:s',mktime(0, 0, 0, $item[1], $item[2], $item[3])) : date('Y-m-d H:i:s',mktime(0, 0, 0, 1, 1, 2000)); $main[$i][$j][2] = $date; // created } } } print_r($main); ?>