If you're trying to bring an old website into Cake, now is the time to
use 1.2 instead of the old 1.1. It'll be stable very soon now (I have
faith in the dev team), so you're best off sticking with the newest
and best.

To get the information out that you're looking for, try using (in
1.2):

$i = 0;
// Loop here
$form->input('Booking.extra_member_group.' . $i, array('type' =>
'select', 'options' => $extraMemberGroup));
$i++;
// End loop here

Completely untested, but this way you get an array of options how
you've requested.


On May 27, 10:55 pm, Sanfly <[EMAIL PROTECTED]> wrote:
> Hi Guys
>
> Im new to cake and still trying to get my head around everything, so
> sorry if the answer to this is obvious. I have been looking around for
> the answer but cant seem to find it
>
> I have a form from an old wesite I'm trying to bring into cake.  In
> the form I have a number of <select> items that pass data into an
> array, eg:
>
> <select name="myselect[]">options here</select>
> <select name="myselect[]">options here</select>
>
> In cake I cant seem to figure out how to make the array.
>
> When I print_r the result from this:
>
> $html->selectTag('Booking/extra_member_group', $extraMemberGroup, '',
> array(), array(), false);
>
> it gives me:
>
> Array( [extra_member_group] => 1 )
>
> But I want it to be like this eg:
>
> Array( [extra_member_group] => Array ( [0] => 2[1] => 1 ) ) )
>
> Ive tried:
>
> $html->selectTag('Booking/extra_member_group[]', $extraMemberGroup,
> '', array(), array(), false);
>
> $html->selectTag('Booking/extra_member_group/', $extraMemberGroup, '',
> array(), array(), false);
>
> I hope this makes sense and appreciate any help anyone can give me
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to