$i = 0;
$rowmax = 3;

$rowcount = 0;

echo '<li>';
foreach ($properties as $property)
{
echo $property[$i];
i++;
$rowcount++;
if ($rowcount == $rowmax)
{
echo '</li><li>';
$rowcount =1;
}

}
echo '</li>';

something like this would work - untested.. may need tweaking or even better
ways to do it

Jonathon



On Sun, Jan 17, 2010 at 6:38 PM, Dave <[email protected]> wrote:

> I have a <?php foreach ($properties as $property): ?>
>
> where I would like to put 3 $property in a row.
>
> So something like this would be the end result:
>
> <li>$property[0] data, $property[1] data, $property[2] data, </li>
>
> <li>$property[3] data, $property[4] data, $property[5] data, </li> and
> so on until its run thru them all.
>
> Any ideas how to do something like this?
>
> Thanks,
>
> Dave
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
>
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to