", "", $source);
$source = str_replace("", "", $source);
$output = "Vinner DNB Fredrikstad Cup";

for($iTeller=0;$iTeller<=12;$iTeller++) {
	$kampnummer = $fnr[$iTeller];
	$lagkode = $fkode[$iTeller];
	
	$sok = "$kampnummer<\/td>";
	$sLine = explode("\n", $source);
	$i=0;
	$rawline = "";
	foreach($sLine as $line) {
		if(preg_match("/$sok/", $line)) {
			$rawline .= $sLine[$i];
			$rawline .= $sLine[$i+1];
			$rawline .= $sLine[$i+2];
		}
		$i++;
	}
	$m = "";
	$rawline = preg_match_all("|<[^>]+>(.*)]+>|U", $rawline, $m);
	$kNr = $m[1][0];
	$kLag1 = $m[1][2];
	$kLag2 = $m[1][4];
	
	$kResultat = $m[1][5];
	$kTid = $m[1][6];
	$kBane = $m[1][7];
	
	$kHB = $m[1][6];
	$kHB = substr($kHB, 0, 1);


	if($kHB == "H") {
		$output .= "
H$lagkode $kLag1";
	} elseif($kHB == "B") {
		$output .= "
$lagkode $kLag2";
	}
	
}

echo $output;