Re: Baffling output
| From: | Joseph W. Goff | Date: | Thu, 02 Jan 2003 22:30:40 +0000 |
| Subject: | Re: Baffling output | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130004@lists.php.net to get a copy of this message | ||
Try viewing the source that is generated in html and I bet you will find
that it is broken html code.
----- Original Message -----
From: "Lightfirst" <dreiff@avenew.com>
To: <php-general@lists.php.net>
Sent: Thursday, January 02, 2003 4:25 PM
Subject: [PHP] Baffling output
> Can someone explain to me why the loop that counts to 99 appears before
the
> 5 by 5 grid in the following php code?
>
> Thanks!
>
> <?php
>
> echo "<table border=\"1\" align=\"center\" width=\"100%\"
> bgcolor=\"#FFFFFF\" bordercolor=\"#FFFFFF\"><tr>";
>
> for ($r=0; $r<5; $r++){
>
> for ($c=0; $c<7; $c++){
>
> if ($c==0 || $c%7==0)
>
> echo "<td align=\"center\" valign=\"middle\"
> width=\"15%\"
> height=\"77\" bordercolor=\"#000000\"></td>"; else if
> ($c%6==0)
>
> echo "<td align=\"center\" valign=\"middle\"
> width=\"14%\"
> height=\"77\"
> bordercolor=\"#000000\"></td></tr><tr>";
>
> else {
>
> echo "<td align=\"center\" valign=\"middle\"
> width=\"15%\"
> height=\"77\" border=\"1\" bordercolor=\"#000000\">";
>
> echo "<div align=\"center\"><font
> size=\"1\"></font></div>";
>
> echo "Hello" ; $i++;
>
> } //for else
>
> }// for loop c
>
> } //for loop r
>
> for ($i=1; $i<100; $i++)
>
> echo "$i<br>\n";
>
> ?>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>