Re: Automatically generating 's?

Tue, 16 May 2006 08:23:30 -0700

Hmm. Do something like this:

<table>
<tr>
<?php

$num = 0;
for($rows as $row)
{
     echo "<td>";
     echo $row['data'];
     echo "</td>";

     if ( ($num % 3) == 0) echo "</tr><tr>";
     $num++;
}
?>
</tr>
</table>

The 3 in the above code will dictate how many columns you will have
until each </tr><tr> is written. You could put this code into a helper
yourself.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to