It's not clear what it is you want to do. Perhaps if you showed us the code in between. Specifically, what is $i used for?
On Tue, Nov 27, 2012 at 5:15 AM, Chris <[email protected]> wrote: > hi guys,... can anyone help please,... > I have 2 foreach statements in my view,... > > how can I combine two or more foreach statements to one,... ? > > <?php $i = 0 ?> > <?php foreach($friends_photo_comments as $photo_comment): ?> > [code].... > <?php $i++ ?> > <?php endforeach ?> > > <?php $i = 0 ?> > <?php foreach($friends_blog_comments as $blog_comment): ?> > [code].... > <?php $i++ ?> > <?php endforeach ?> > > thanks in advance, > chris > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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]. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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]. Visit this group at http://groups.google.com/group/cake-php?hl=en.
