<?php

// Stop google & friends
echo "<html><head><meta name=\"robots\" content=\"noindex\" /></head><body>";

include_once(
"flatfiletools.lib.php");

$a = new FlatfileTools();

$a->set_datafile("demo.txt");
$a->populate(); // DO NOT FORGET THIS LINE TO SAVE HEADACHES

$ncol $a->get_number_of_lines();
$row $ncol 1;

echo 
"<table border=0>";
for(
$i 0$i <= $row$i++) {
$z $a->get_line($i);
if(
$i == 0) {
echo 
"<tr><th>{$z[0]}</th><th>{$z[1]}</th><th>{$z[2]}</th></tr>\n";
} else {
echo 
"<tr><td>{$z[0]}</td><td>{$z[1]}</td><td>{$z[2]}</td></tr>\n";
};
};

echo 
"<a href='demo.phps'>View the Source Code (GPL v2 or later)</a>";
echo 
"<a href='demo.txt'>View the Database File</a>";

echo 
"</body>";
?>