note 30500 deleted from function.pow by sniper
| From: | sniper@php.net | Date: | Fri, 03 Oct 2003 23:25:40 +0000 |
| Subject: | note 30500 deleted from function.pow by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57786@lists.php.net to get a copy of this message | ||
Note Submitter: martin@NOSPAM.siebenstaedt.com
----
if you are making lists with alternating colors each line you can use
this:
$color=array("xxxxxx","","yyyyyy");
{
....
echo"<tr bgcolor=".$color[1+pow(-1,++$x)].">.....</tr>";
....
}
instead of:
{
....
if(++$i%2) then $color=xxxxxx;
else $color=yyyyyy;
echo "<tr bgcolor=".$color.">..................</tr>";
....
}