/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$query = "SELECT * FROM table"; $i = 1; if ($i % 2) {echo"<div style='background:#eaeaea;'>".$row['content']."</div>";} else {echo $row['content'];} $i++; }