Friday, May 29, 2009

Re: Count array

or count($this->data['Entry'])

On May 29, 4:13 am, Marcelo Andrade <mfandr...@gmail.com> wrote:
> On Thu, May 28, 2009 at 11:05 PM, Dave Maharaj :: WidePixels.com
>
> <d...@widepixels.com> wrote:
>
> > Whats the easiest way to count the number of items in an array? I use the
> > data in the array so its more than just a count.
>
> > I simply want to find if the array has more than 5 items then pass a
> > variable to the view to use a different div.
>
> > Example:
>
> > [Entry] => Array
>
> Ahn... have you tried
>
> sizeof( $this->data['Entry'] )
>
> ???
>
> Best regards.
>
> --
> MARCELO DE F. ANDRADE
> Belem, PA, Amazonia, Brazil
> Linux User #221105
>
> http://mfandrade.wordpress.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: