I used
$i = 0;
foreach ($results as $error):
$i = $i++;
debug($error);
endforeach;
So each error can be displayed
_____
From: Dave Maharaj :: WidePixels.com [mailto:[email protected]]
Sent: April-29-09 9:01 PM
To: [email protected]
Subject: RE: Value from Key
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
-~----------~----~----~----~------~----~------~--~---