using variable ..help

From: Date: Wed, 28 Aug 2002 13:46:01 +0000
Subject: using variable ..help
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-114359@lists.php.net to get a copy of this message
I wanna do with my <TR> bgcolor trough my array <?$mycolor = array("#E8D0E8", "#F8EFF8");?> <table> <?php while ($row=mysql_fetch_array($result)){?> <tr bgcolor="<?for($i=0;$i<=count($mycolor[$i]);++$i){
                 echo ("$mycolor[$i]");
                    }
               ?>">
       <td>blablabbaba</td>
</tr> <? } ?> </table> I have look my view source output my TR bgcolor , and i found this below <tr bgcolor="#E8D0E8#F8EFF8""> I want my <tr> bgcolor display with one by one like this below <tr bgcolor="#E8D0E8"> <td></td> </tr> <tr bgcolor="#F8EFF8"> <td></td> </tr> etc.... help please.....

« previous php.general (#114359) next »