Let's assume you have all the information in an array like this:
array[Rank] (
Name/1=>their name
Wins/2=>their wins
Losses/3=>their losses
Win/4=>their win%
)
First, count the number of rows you'll have (indices in the array "array"):
You can use count(array) to count how many indices are in array:
for ($i=0;$i<count(array);$i++) {
echo("<tr>");
// fields (next section)
echo("</tr>");
}
You'd then need to count how many fields you want, unless you already know: (you could just do 5 fields)
Use count(array[$rank]) to count how many indices are in array[$rank]:
for ($i=0;$i<count(array[$rank]);$i++) {
echo("<td>".array[$rank][$i]."</td>");
}
So, together, use something like this:
echo("<table>");
for ($tr=0;$tr<count(array);$tr++) {
echo("<tr>");
for ($td=0;$td<count(array[$rank]);$td++) {
echo("<td>".array[$rank][$td]."</td>");
}
echo("</tr>");
}
echo("</table>");
Of course, edit this where needed. I hope this helps.