", "", $source); $source = str_replace("", "", $source); $sok = "$kKlasse - Pulje $kPulje"; $sok2 = "Lag  <\/b>"; $sLine = explode("\n", $source); $i=0; $rawline = ""; $trExplode = ""; foreach($sLine as $line) { if(preg_match("/$sok/", $line)) { //Fant søk1 finn søk2 $sokf = true; } if($sokf) { if(preg_match("/$sok2/", $line)) { //echo "$i - $line"; $trExplode = explode("", $line); break; } } $i++; } $lag = array(); $score = array(); $output = ""; foreach($trExplode as $trline) { $m = ""; $trline = str_replace("", "", $trline); $trline = str_replace("", "", $trline); $rawline = preg_match_all("|<[^>]+>(.*)]+>|U", $trline, $m); $k1 = $m[1][0]; $k8 = $m[1][7]; if($k1 and $k8 != "P  ") { array_push($lag, $k1); array_push($score, $k8); $output .= "$k1, $k8
"; } } if($score[0] != $score[1]) { $output .= " ". $lag[0] ." leder klasse $kKlasse pulje $kPulje ved innbydelse."; } echo $output; ?>