Hi.
why don't you do it with css ? :)
.alt{ background-color: #000; }
<table>
<?php $i=0; foreach ($autors as $row): ?>
<?php ($i++%2 == 0)?$class=' class="alt"': $class=''; ?>
<tr<?php echo $class;?>>
<td>$row...</td>
<td>$row...</td>
</tr>
<?php endforeach; ?>
</table>
greets
Andreas
[email protected] schrieb:
> Hi, new at cakephp, so I'm trying with some tutorials, but using
> tablecells doesn't work with bgcolor, I get the table with rows and
> data but all rows are white, I mean odds and even rows are in same
> color, what I'm doing wrong?
>
> <table>
> <?php foreach($autors as $row) {
> echo $html->tableCells( array ( $row['Autor']['id'],
> $row['Autor']['nombre'],
> $row['Autor']['apellido'],
> $row['Autor']['fecha_nacimiento'],
> $row['Autor']['fecha_defuncion'] ) ,
>
> array ('bgcolor'=>'#FFCC99'));}
> ?>
> </table>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---