title: Is it bad practice to use PHP to manipulate css classes
body: <p>A php loop get items from db and displays them in rows, 
  I want the odd (1,3,5,7..) to have a specific css rotation transform. the same for the even rows.  I thought in creating the 2 classes with the desired transforms, then add then by creating a variable in php and passing the name of the class for each case as a string. Then the html smth like: </p>
  
  <pre><code>&lt;div class=box "&lt;?php echo $trans_class;?&gt;"&gt;  
  </code></pre>
  
  <p>Should I accomplish this using javascript, or php is fine?</p>