11-24-2008, 01:04 AM
|
#7 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
I had a stab at a different approach for doing this without the ternary operator. See what you think to this, as it has support for many colours also.
Code:
<table>
<?php declare (ticks = 1): ?>
<?php foreach ($aData as $iNumber): ?>
<tr style="background-color: <?php echo $pRowColours->get(); ?>">
<td>Row <?php echo $iNumber; ?></td>
</tr>
<?php endforeach; ?>
<?php enddeclare; ?>
</table>
Edit: Just a side note though, you don't have to use ticks for this. It could work without it.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Last edited by Wildhoney : 11-24-2008 at 01:58 AM.
|
|
|