You have to set() the variable afterwards. You're adding a value to a purely local variable.
array_unshift($counties, array("none"=>"Pick me!")); $this->set(compact('counties')); $this->render('/examples/ajax_dropdown'); On Sat, Aug 29, 2009 at 11:28 PM, FrederickD<manzanillo.engl...@gmail.com> wrote: > > Hey there... this thread may hold the answer to my post that is here: > > http://groups.google.com/group/cake-php/browse_thread/thread/25fa39d4e10bff7c# > > Would one of you please take a quick look at my question on the > thread? I tried the array_unshift and put it in my controller just > before the render, as Brian suggested, but I did not get the 'Pick > me!' in the list after I selected a state. > > array_unshift($counties, array("none"=>"Pick me!")); > $this->render('/examples/ajax_dropdown'); > > Thoughts? Comments? Code snippet? Thank you! > > On Aug 27, 2:44 pm, channel5 <edd.daw...@comptonsolutions.com> wrote: >> Thanks all for your help, worked a charm! >> >> Thanks again :) >> c5 > > > --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---