Hi there,
Now i have a bunch rows in a SQL Database that i want to have displayed in a table but each rows info must be displayed in a column, for example the rows has data like this:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
so, lets say there is 3 rows it should display it like this :
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
8 8 8
9 9 9
10 10 10
this is the code i have so far:
$query = "SELECT 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 FROM info ORDER BY id";
$result = mysql_query($query) or die('Error : ' . mysql_error());
$content = "<table>";
//code goes here, i guess it will be some kind of foreach loop or something
$content .= "</table>";
echo $content;
I guess it will be a foreach loop i guess, i know how to work with the while loop but then it creates a column below each other and not next to each other. Help Please...Thank u