PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
After you extract the data, use a for loop to echo out each row. Inside the loop, test for odd/even, and set the background color for the row as needed.
In your CSS sheet you could have two different ID's for the different background color rows. When you are looping through your results, alternate the tags when filling in the table.
What you are looking for is commonly refered to as zebra striping or alternating row colors. There have been thousands of posts (maybe hundreds, but I think thousands sums it up best) about this topic in this community. Search around a little. You'll find them.