RE: [PHP] Alternating table rows...

From: Date: Fri, 10 May 2002 20:07:03 +0000
Subject: RE: [PHP] Alternating table rows...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-97005@lists.php.net to get a copy of this message
Just another version. <?php function useColor() { static $ColorValue; // remember the last color if ($ColorValue == "#00FF00") {
        $ColorValue ="#CCFFCC";
else {
        $ColorValue ="#00FF00";
} return($ColorValue); } ?> the call ... $RowColor = useColor(); ... echo '<td bgcolor='.$RowColor.'>'; - Jp At 15:46 10/05/02, you wrote:
[snip] <? $rowcount = 0; while($dbrowa = mysql_fetch_object($dbseta)){
        $dbrowb = mysql_fetch_object($dbsetb);
//change the color of alternating rows $rowcount ++; if ($rowcount == 1){........too many lines of code [/snip] I get humbled by this list every day. Could I have Single PHP Lines for a thousand Alex? Dammit, still thinking like an old Basic programmer... Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
________________________________________________________ Juan Pablo Aqueveque <juque@uct.cl> Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628

« previous php.general (#97005) next »