This is very poorly done but I was hoping someone could possibly help me out here... I am trying to write an Inventory script thingy for an RPG..
Currently this is what I have:
Code:
<?php
$invent = array("1","2","3","4","5","6",
"7","8","9","10","11","12",
"13","14","15","16","17","18",
"19","20","21","22","23","24");
echo "<table>";
$set = 5;
for($i=0;$i<count($invent);$i++)
{
if(($i % 6) < 1)
{
$set = $set + 6;
echo "<tr>";
for($f=0;$f<$set;$f++)
{
echo "<td>" . $invent[$f] . "</td>";
}
echo "</tr>";
}
}
?>