Wedstrijdagenda

Op dit moment worden de nieuwe wedstrijdschema’s nog gemaakt
[insert_php]
$row = 1;
$array = [];
$matches = [];
$matchcount = 0;

if (($handle = fopen(“http://rugbyclubhaarlem.com/wp-content/uploads/2017/10/websiteschema.csv”, “r”)) !== FALSE) {
while (($data = fgetcsv($handle, 1000, “;”)) !== FALSE) {
$num = count($data);
if ($row == 1) {
for ($c=0; $c < $num; $c++) { $array[$c] = $data[$c]; } $row++; continue; } $row++; for ($c=0; $c < $num; $c++) { $matches[$matchcount][$array[$c]] = $data[$c]; } $matchcount++; } fclose($handle); $newdate = date("d-m-Y"); echo '

‘;
foreach($matches as $match) {
$matchdate = date(‘d-m-Y’, strtotime($match[“Match date”]));
$now = date(‘d-m-Y’);
$today_time = strtotime($now);
$match_time = strtotime($matchdate);

if ($match_time < $today_time) { continue; } if ($newdate != $matchdate) { echo '

‘;
$newdate = $matchdate;
}

echo ‘

‘;
echo ‘

‘;
}
echo ‘

‘.$matchdate.’
‘.$match[‘Time’].’ ‘.$match[‘Home team’].’ vs ‘.$match[‘Away team’].’

‘;
}

[/insert_php]