note 73931 deleted from language.operators.arithmetic by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 15:06:18 +0000 |
| Subject: | note 73931 deleted from language.operators.arithmetic by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189812@lists.php.net to get a copy of this message | ||
Note Submitter: lucas
----
following from jonathon's and sean's notes, imho booleans are simpler for alternating rows
<ul>
<?php
$alt=true;
for($i=0;$i<count($items);$i++)
{
echo '<li'.($alt?'
class="alternate"':'').'>'.$items[$i].'</li>';
$alt=!$alt;
}
?>
</ul>