just do a foreach loop.
http://us.php.net/manual/en/control-structures.foreach.php


On Apr 30, 3:36 am, Aivaras <[email protected]> wrote:
> for($i = 0; $i < count($array); $i++){
>    echo $array[$i]; // will output your error
>    echo $i; // will output the index.
>
> }
>
> Still, I have absolutely no idea why would you need to know indexes for
> error reporting.
>
> Faifas
>
> On Thu, Apr 30, 2009 at 02:30, Dave Maharaj :: WidePixels.com <
>
> [email protected]> wrote:
> >  Right but the [0] [1] will change depending on the array its self.
>
> > I do not know the number that will be generated as it could be an  array of
> > errors.
>
> > If there is 1 error [0] but if 10 errors?
>
> > Ideas?
>
> >  ------------------------------
> > *From:* Aivaras [mailto:[email protected]]
> > *Sent:* April-29-09 7:42 PM
> > *To:* [email protected]
> > *Subject:* Re: Value from Key
>
> > Hey,
>
> > echo $the_variable_you_are_pr_ing[$key]
>
> > example: echo $aNonsenceLetters[0]; // outputs: jkl
>
> > Cheers,
> > Faifas
>
> > On Thu, Apr 30, 2009 at 00:47, Dave Maharaj :: WidePixels.com <
> > [email protected]> wrote:
>
> >> How can i get the value of a key?
>
> >> the array is from debug($requests);
> >> for example my array is:
>
> >> Array
> >> (
> >>    [0] => jkl
> >>    [1] => ii
> >>    [2] => yyy
> >> )
> >> thanks,
>
> >> Dave
--~--~---------~--~----~------------~-------~--~----~
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