Php - Looping For Different CSS

Posted by bob on Stack Overflow See other posts from Stack Overflow or by bob
Published on 2009-09-30T05:06:55Z Indexed on 2010/05/15 6:54 UTC
Read the original article Hit count: 329

Filed under:
|
|
|
|

MySQL

$selectSize     = "SELECT * FROM products";
$querySize      = $db->select($selectSize);
while ($product = $db->fetcharray($querySize)) {

HTML

<ul>
<li>Product A</li>
<li>Product B</li>
<li class='right'>Product C</li>
<li>Product D</li>
<li>Product E</li>
<li class='right'>Product F</li>
</ul>

Question

While getting the product, I want the Product C and Product F or any product after 3 loops will have class='right' to the list style. Let me know

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about css