get_filename(); foreach ($board_database as $prefix => $rounds) { foreach ($rounds as $round => $boards) { if ($prefix . $round === $roundPrefix) { $deals_by_tables = load_deals_for_tables($board_database, $prefix, $round, $board); if (count($deals_by_tables) > 0) { foreach($deals_by_tables as $table => $deal) { $protocol->set_deal($table, $deal); } echo $protocol->output(); exit(0); } } } } readfile($html_filename); } catch (Exception $e) { header('HTTP/1.0 404 Not Found'); die(); }