View Single Post
Old 04-12-2008, 02:00 AM   #2 (permalink)
Aaron
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

When the information comes out of the database it is already in an array... Why make it harder to process?

Just put the group, name, and data all in a different array, and then do something like,
PHP Code:
$count 0;
while(
$whatever}
{
echo 
'<tr>';
echo 
'<td>' $name[$count] . '</td>';
echo 
'</tr>';
echo 
'<tr>';
$forcount 0;
  foreach(
$data)
  {
  echo 
'<td>' $data[$count] . '<td>';
  
$forcount++;
    if(
$forcount == 2)
    {
      
$forcount 0;
      echo 
'</tr>\n<tr>' #bust out a new row so you only have two "data" in a row.
    
}
  }
echo 
'</tr>';
count++;

Just do something like that, and modify it to your formatting needs.
__________________
Signatures are nothing but incriminating.

Last edited by Aaron : 04-12-2008 at 02:09 AM. Reason: Providing an answer
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote