Hey John,

Thanks for spotting that.

So.. do I need to use 2 different incrementors? $z and say $x for each
part?

I basically pieced this code together from several examples I found so
forgive forgive the fact I don't know a whole lot about the code even
though I've tried to understand it as much as possible *shrugs*

Aaron

-----Original Message-----
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: August 5, 2003 9:08 AM
To: Aaron Wolski; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] displaying result across 3 cells - where did I go
wrong?

From: "Aaron Wolski" <[EMAIL PROTECTED]>
>
>                                                 while($z++ %3 !==0)
[snip]
>                 echo (++$z %3 == 0) ? '</tr>' : '';

The first time through your code, $z is zero. Since the "thread titles"
don't match, your going to get to your while loop above. $z is zero, so
your
while loop isn't executed, but $z is incremented to one. Then, later in
your
code you increment $z to two and check for the modulus 3. So basically,
every time you switch "thread titles", $z is incremented one more than
it
should be and you miss out on one cell in the following row.

---John Holmes...


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to