require help with the following:-
Want to format tables from a data list where retrieves a list of data and then does a return on the table when it reaches a set limit (ie5)
//Draw main wrapped table header//
."<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\"><tr><td>";
// Select data and template file which is basically another table with all data in a full table
$tmpl = "modules/$module_name/templates/cadets.html";
$thecadets = implode("", file($tmpl));
$thecadets = addslashes($thecadets);
$thecadets = "\$c_file=\"".$thecadets."\";";
eval($thecadets);
print $c_file;
//
//echo "<td align=\"center\" valign=\"middle\"><img src=\"{$row['filepath']}/{$row['filename']}\" border=\"0\"><br><br>"
//."$name<br>$class<br>[ $flight ]";
$a++;
then repeat until reaches 5 do then there are 5 mini tables before it does next line then start again.
//This works justabout but looks messy is there Another way
if ($a == 5) {echo "</td></tr>"; $count = 0;
}
if ($a == 10) {echo "</td></tr>"; $count = 0;
}
if ($a == 15) {echo "</td><tr>"; $count = 0;
}
//etc etc
//close main table
echo "</td></tr></table><br>
Thanks for help in advance🆒