Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[gray]// assuming this is how your data looks[/gray]
[navy]$data[/navy] [teal]= [[[/teal][i][green]'r1c1'[/green][/i][teal],[/teal] [i][green]'r1c2'[/green][/i][teal],[/teal] [i][green]'r1c3'[/green][/i][teal]], [[/teal][i][green]'r2c1'[/green][/i][teal],[/teal] [i][green]'r2c2'[/green][/i][teal],[/teal] [i][green]'r2c3'[/green][/i][teal]], [[/teal][i][green]'r3c1'[/green][/i][teal],[/teal] [i][green]'r3c2'[/green][/i][teal],[/teal] [i][green]'r3c3'[/green][/i][teal]], [[/teal][i][green]'r4c1'[/green][/i][teal],[/teal] [i][green]'r4c2'[/green][/i][teal],[/teal] [i][green]'r4c3'[/green][/i][teal]]];[/teal]
[navy]$heads[/navy] [teal]= [[/teal][i][green]'r0c1'[/green][/i][teal],[/teal] [i][green]'r0c2'[/green][/i][teal],[/teal] [i][green]'r0c3'[/green][/i][teal]];[/teal]
[gray]// this should do it[/gray]
[COLOR=orange]array_splice[/color][teal]([/teal][navy]$data[/navy][teal],[/teal] [purple]0[/purple][teal],[/teal] [b]null[/b][teal], [[/teal][navy]$heads[/navy][teal]]);[/teal]
require_once('../includes/SimpleXLSXGen.php');
try {$db = new PDO("mysql:host=".HOST.";dbname=".DBNAME, USER, PASS);}
catch(PDOException $e) {exit("Geen verbinding met database");}
$koppen=array('Lidnr','Achternaam','Titel','vl.','tsv','Adres','Postcode','Woonplaats','Telefoon','Email','Rekening','t.n.v.','Incasso?','Geboortejaar','Lid vanaf','Lid tot','Nieuwsbrief?','Relatie','Tellid');
$result="(SELECT lidnr,achternaam,titel,voorletter,tussenvoegsel,adres,postcode,woonplaats,telefoon,email,reknr,reknaam,incasso,geboortejaar,datumin,IF(datumuit='0000-00-00','',datumuit),nieuwsbrief,relatie,tellid
FROM ledenadmin ORDER BY relatie, achternaam, voorletter)";
$q=$db->prepare($result);
$klaar=$q->execute();
if (!$klaar){echo "Fout ".$q->errorCode()."; admin/ledenbestand.php; 1; gegevens niet ingelezen!<br>";die();}
$result = $q->fetchAll(PDO::FETCH_ASSOC);
$tabel=array_splice($result, 0, null, [$koppen]);
$xlsx = Shuchkin\SimpleXLSXGen::fromArray( $tabel )->downloadAs('ledenbestand.xlsx');
[COLOR=orange]array_splice[/color][teal]([/teal][navy]$result[/navy][teal],[/teal] [purple]0[/purple][teal],[/teal] [purple]0[/purple][teal], [[/teal][navy]$koppen[/navy][teal]]);[/teal]