Changing if(array_key_exists('Improvement'... to if
(array_key_exists('Improvements'... removes the notice? Seems to be
working now.
On Apr 2, 8:31 pm, rossjha <[email protected]> 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)
>
> On Apr 2, 8:11 pm, John Andersen <[email protected]> wrote:
>
> > So it means that the index ['status'] probably doesn't exists!
> > Check for it as you do for the ['Improvement'] index!
> > Maybe it should be written as ['Status'] ?
> > Enjoy,
> > John
>
> > On Apr 2, 9:57 pm, rossjha <[email protected]> wrote:>
> > foreach($results as $key => $val){
>
> > > if(array_key_exists('Improvement', $val)){
>
> > > $results[$key]['Improvement']['status'] = $this-
>
> > > >getStatus($results[$key]['Improvement']['status']);
>
> > [snip]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---