Reply to Re: Problem with table...

Your name:

Reply:


Posted by Beauregard T. Shagnasty on 10/13/22 11:36

Leszek wrote:

> 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::

Let me edit your code. I'll remove several <tr> and </tr>:

echo "<table align=\"center\" width=\"100%\">";
echo"<tr><td>Room:</td>";
echo"<td>Price:</td>";
echo"<td>How many rooms?:</td></tr>";

// data display

$wynik2=mysql_query($hotel_query2);
while($wiersz2=mysql_fetch_array($wynik2,MYSQL_NUM))
{
echo"<tr><td>".return_data($wiersz2[0])."</td>";
echo"<td >".return_data($wiersz2[1])."</td>";
echo"<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?

Is this what you mean? <tr> starts a new row; you do not want to put
each "column" in its own row.

--
-bts
-Warning: I brake for lawn deer

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация