I realize this is trivial... but if you're using things like the code
below alot it can clean things up a bit by using:

if (($counter % 2) == 0 && ($counter != 0))
        echo "<BR>";
echo "<img src=whatever...>\n";

Just reads easier... less branching, less code.  In an ideal world it'd
optimize into machine code better than the below snippet too -- but that's
get anal retentive about the situtation :)

Justin Buist
Trident Technology, Inc.
4700 60th St. SW, Suite 102
Grand Rapids, MI  49512
Ph. 616.554.2700
Fx. 616.554.3331
Mo. 616.291.2612

On Wed, 22 Aug 2001, Marios Moutzouris wrote:

> use that counter variable. check if its equal to 2 before incrementing, if
> it is then "<BR>" and reset to zero, otherwise just increment.
> if ($counter==2) {
>     echo "<BR>";
>     $counter=0;
> } else {
>     $counter++;
> }

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to