View Single Post
Old 03-23-2008, 03:58 AM   #2 (permalink)
psychdev
Junior Member
 
Join Date: Mar 2008
Posts: 11
Default Re: I need the PHP code to display in the proper place in a table

You want to use a for loop and arrays.

in the form of

$data = array()

$getData = ("SELECT * FROM table")

while($row = @mysql_fetch_array($getData))
{
$data[$row[id]] = $row[columnName];
}

for($i = 0; $i <= (sizeof($data)-1); $i++)
{
echo "<table>";
echo "\n<tr><td>".$data[$i]."</td></tr>";
echo "</table>";
}
psychdev is offline   Reply With Quote
Sponsored Links