I wrote a php script that reads some dara from database and displays it as
a table:
The problem is that the data are showing in table rows Is it possible to
display it as a new colum next to an existing one?
Here is php code::
echo "<table align=\"center\ " width=\"100%\"> ";
echo"<tr><td>Ro om:</td></tr>";
echo"<tr><td>Pr ice:</td></tr>";
echo"<tr><td>Ho w many rooms?:</td></tr>";
// data display
$wynik2=mysql_q uery($hotel_que ry2);
while($wiersz2= mysql_fetch_arr ay($wynik2,MYSQ L_NUM))
{
echo"<tr><td>". return_data($wi ersz2[0])."</td></tr>";
echo"<tr><td >".return_data( $wiersz2[1])."</td></tr>";
echo"<tr><td >".return_data( $wiersz2[2])."</td></tr>";
}
echo "</table>";
Each while pass creates 3 rows. Is it possible to make new column (with 3
rows) next to the one that already exists?
Thanks.
Leszek
a table:
The problem is that the data are showing in table rows Is it possible to
display it as a new colum next to an existing one?
Here is php code::
echo "<table align=\"center\ " width=\"100%\"> ";
echo"<tr><td>Ro om:</td></tr>";
echo"<tr><td>Pr ice:</td></tr>";
echo"<tr><td>Ho w many rooms?:</td></tr>";
// data display
$wynik2=mysql_q uery($hotel_que ry2);
while($wiersz2= mysql_fetch_arr ay($wynik2,MYSQ L_NUM))
{
echo"<tr><td>". return_data($wi ersz2[0])."</td></tr>";
echo"<tr><td >".return_data( $wiersz2[1])."</td></tr>";
echo"<tr><td >".return_data( $wiersz2[2])."</td></tr>";
}
echo "</table>";
Each while pass creates 3 rows. Is it possible to make new column (with 3
rows) next to the one that already exists?
Thanks.
Leszek
Comment