Here is a sample of my simple little code
$query="SELECT * FROM agents";
$result=mysql_query($query) or die (mysql_error());
while ($row = mysql_fetch_array($result)) // this will grab the results from query
{
$name[]= $row[agent_name];
}
$howmany = count($name);
echo $howmany;
What I would like to be able to do is create a table based on the count given in $howmany. In this example $howmany=6
So, how can I creata a 2 column table....and have the table smart enough to know it needs to create 3 rows to fill in the data with?
So the tables gets created on the fly and fills in like this?
| $name[0] | $name[1] |
| $name[2] | $name[3] |
| $name[4] | $name[5] |
Any ideas?