RE: [PHP] Newbie question about filling tables.
| From: | Angel Behar Rodriguez | Date: | Wed, 22 Nov 2000 16:47:54 +0000 |
| Subject: | RE: [PHP] Newbie question about filling tables. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26663@lists.php.net to get a copy of this message | ||
First of all, thanks for your answer.
I already try the way you told me, but my problem is when I
try to fill the cells in the second column everything becomes a mess, I
mean the first record prints in the cell of row 1 column 1 the second
record fills the row 1 COLUMN 2, the 3rd record prints the row 2 column 1
and so on.
Hope this help for an overview of the problem.
thanks in advance.
P.S. Sorry abou my english
---------------------------------------------------------------------------
Ing. Angel Behar R. | "The box says : Windows 98, Windows NT or BETTER
Tel : (67) 15-15-15 | That's why I installed FreeBSD"
---------------------------------------------------------------------------
On Wed, 22 Nov 2000, Krznaric Michael wrote:
> Just put echo or print statement around what you have listed below.
> print "<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"
> WIDTH="491"
> HEIGHT="200">";
>
> while($i=mysql_fetch_array($query)) {
> print "<TR><TD WIDTH="245" VALIGN="MIDDLE">$Record
> Name<P>$Some_More_Record_Stuff</P></TD></TR>";
> }
> print "</TABLE>"
>
> This should give you an idea.
>
> Mike
> -----Original Message-----
> From: Angel Behar Rodriguez [mailto:abehar@mail.pacificnet.com.mx]
> Sent: Wednesday, November 22, 2000 11:01 AM
> To: php-general@lists.php.net
> Subject: [PHP] Newbie question about filling tables.
>
>
>
> Hi, Im running php 4.0.3pl1 in a linux 6.2 box, and I'm trying to "fill" a
> two column x five row table with a different record each cell, I don't
> have too much experience with php programming, so I can make the MySql
> query and fetch the results, but once I start the
> while($i=mysql_fetch_array($query)) command then
> I dont' know how to display each record in the cell, hope somebody can
> help me or give me some ideas.
>
> Thanks in advance.
>
> The General idea is the following :
>
> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"
> WIDTH="491"
> HEIGHT="200">
> <TR>
> <TD WIDTH="245" VALIGN="MIDDLE">Record 1
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> <TD WIDTH="4" VALIGN="MIDDLE"></TD>
> <TD WIDTH="242" VALIGN="MIDDLE">Record 2
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> </TR>
> <TR>
> <TD WIDTH="245" VALIGN="MIDDLE">Record 3
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> <TD WIDTH="4" VALIGN="MIDDLE"></TD>
> <TD WIDTH="242" VALIGN="MIDDLE">Record 4
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> </TR>
> <TR>
> <TD WIDTH="245" VALIGN="MIDDLE">Record 5
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> <TD WIDTH="4" VALIGN="MIDDLE"></TD>
> <TD WIDTH="242" VALIGN="MIDDLE">Record 6
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> </TR>
> <TR>
> <TD WIDTH="245" VALIGN="MIDDLE">Record 7
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> <TD WIDTH="4" VALIGN="MIDDLE"></TD>
> <TD WIDTH="242" VALIGN="MIDDLE">Record 8
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> </TR>
> <TR>
> <TD WIDTH="245" VALIGN="MIDDLE">Record 9
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> <TD WIDTH="4" VALIGN="MIDDLE"></TD>
> <TD WIDTH="242" VALIGN="MIDDLE">Record 10
> <p>$var1 ; $var2, $var3 </p>
> </TD>
> </TR>
> </TABLE>
>
>
> ---------------------------------------------------------------------------
> Ing. Angel Behar R. | "The box says : Windows 98, Windows NT or BETTER
>
> Tel : (67) 15-15-15 | That's why I installed FreeBSD"
> ---------------------------------------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>