...and onto a page. I have a text file that holds information seperated by a | that I display on a page. How would I summarise the titles at the top of the page using the exploded data that creates the rest of the page?
<?php
$beginnersFile = "../activeData/beginners.txt";
$file = file($beginnersFile);
print "<ul>\n";
while(list($key, $val) = each($file)) {
$data = explode("|", $val);
printf("<li><a href=\"#%s\">%s</a>", $data[1], $data[0]);
}
print "</ul>";
print "<table>\n";
while(list($key, $val) = each($file)){
$data = explode("|", $val);
print "<tr>\n";
printf("<td>");
printf("<h4><a name=\"%s\">%s</a></h4>", $data[1], $data[0]);
printf("%s <!-- %s -->", $data[2], $data[3]);
printf("<p align=\"right\"><a href=\"#top\"><img src=\"/images/top.gif\" border=\"0\"></a></td>\n");
print "</tr>\n";
}
print "</table>\n";
?>
If you can see what I have tried to do then maybe you can help...?
Thanks in advance...