find("table[id=ladderData] tr"); // Solve the rankings from the table foreach ($tauluEU as $riviEU) { if (in_array($riviEU->find("a", 0)->href,$linkki)) { $tuloksetEU[] = "#" . $riviEU->find('td', 0)->innertext; // add # to all results } } $tauluUS = $htmlUS->find("table[id=ladderData] tr"); // Solve the rankings from the table foreach ($tauluUS as $riviUS) { if (in_array($riviUS->find("a", 0)->href,$linkki)) { $tuloksetUS[] = "#" . $riviUS->find('td', 0)->innertext; // add # to all results } } $htmlEU->clear(); // Unset the $html variant to allow f5 to refresh data unset($htmlEU); $htmlUS->clear(); // Unset the $html variant to allow f5 to refresh data unset($htmlUS); echo join(", ", $tuloksetUS); // print the results in wanted style echo " / "; echo join(", ", $tuloksetEU); // print the results in wanted style ?>