On Sat, 2003-02-08 at 18:25, CF High wrote:
> Hey all.
>
> I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the
> following:
>
> <tr bgcolor="###Iif(((CurrentRow MOD 2) is
> 0),de('FFFFFF'),de('EEEEEE'))#">
>
> Any ideas how to do this in PHP?
>
One possibility:
while (whatever) {
$bgcolor = ($i++ & 1) ? '#c0c0c0' : '#ffffff';
echo "<tr bgcolor=\"$bgcolor\"><td>bla-bla</td></tr>";
}
-Brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php