Here\'s a PHP example of mine. Can anyone find a shorter/easier way to do this?
foreach($posts as $post){?>
function row_color($cnt,$even,$odd) { echo ($cnt%2) ? "" : ""; } How to use: $cnt=0; while ($row = mysql_fetch_array ($result)) { row_color($cnt++,"e0e0e0","FFFFFF"); } 0 讨论(0) 查看其它19个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
How to use:
$cnt=0; while ($row = mysql_fetch_array ($result)) { row_color($cnt++,"e0e0e0","FFFFFF"); }