harkly Posted January 8, 2010 Share Posted January 8, 2010 I am setting up a private message board and am wondering how do I get my output to change a color on every other one? Very much like the PMs of this forum. while($r = mysql_fetch_array($sql)) { $posted = date(" F j, Y",$r[posted]); echo " <div id='viewReply'> <div id='userID'>$r[author]</div> <div id='msgImage'><span class='img-shadow'><img src='img/1.JPG' height='65' width='65' border='0'></span></div> <div id='viewInfo'> re: <span class='text'>$r[title]</span><br> on: <span class='text'>$posted</span> <br> <br> Message: <span class='text'>$r[message]</span> </div> </div> "; } Is there a tutorial for this somewhere? Link to comment https://forums.phpfreaks.com/topic/187754-change-colors/ Share on other sites More sharing options...
simshaun Posted January 8, 2010 Share Posted January 8, 2010 There are numerous different ways to do this. Google alternating rows. Link to comment https://forums.phpfreaks.com/topic/187754-change-colors/#findComment-991281 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.