Thursday, April 2, 2009

Re: Undefined index

Exactly which line is giving you the error?
As you are using a foreach loop, and you are only showing one record
in the $results array, have you checked all the records in the
$results array?
If you only have one record in the $results array, then why use a loop
at all!
Please confirm that you have validated/checked all the values in all
the records in $results array!
Enjoy,
John

On Apr 2, 10:31 pm, rossjha <Ross.Hagg...@googlemail.com> wrote:
> I successfully change the status value to my desired value, array
> below, but i still receive the notice?
>
> $results:
> array
>   0 =>
>     array
>       'Improvement' =>
>         array
>           'id' => string '5' (length=1)
>           'user_id' => string '12' (length=2)
>           'title' => string 'dictum pharetra. Pel' (length=15)
>           'description' => string '<p>Lorem ipsum dolor sit amet,
> consectetur adipiscing elit. Aliquam sit amet lacus eget eros dictum
> pharetra. Pellentesque tristique malesuada diam. Duis lobortis diam.
> Mauris neque. Sed posuere, magna sit amet tristique dictum, nulla
> tortor condimentum lorem, nec vestibulum ligula massa non metus.
> Quisque condimentum blandit mauris. In hac habitasse platea dictumst.
> Pellentesque consectetur est ut odio. Curabitur ornare nulla sed
> ligula. Sed lobortis, nulla a gravida gravida, felis nulla volutpat
> massa, si'... (length=1225)
>           'status' => string '0' (length=1)
>           'flag' => null
>           'private' => string '0' (length=1)
>           'created' => string '2009-03-17 09:21:00' (length=19)
>           'modified' => string '2009-03-17 09:21:00' (length=19)
>
[snip]
--~--~---------~--~----~------------~-------~--~----~
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: