Neat PHP trick for alternate background display

Posted September 27th, 2010 in Tehnikalije by Metod

Many is the time we have to use alternate background for displaying some data. The usual solution to this problem would look something like:

Which in my opinion is somewhat a dirty solution. So I did a little research and found a bit neater solution:

It might even be a bit faster but I have not done any benchmarking.