Could anyone point me in the right direction with this one please?
I'm trying to pass some values to my view...
$stages = $this->Stage->findAll(
null, array('id', 'name'), null, null
);
$this->set('stages', $stages);
... this is what's being passed...
Array
(
[0] => Array
(
[Stage] => Array
(
[id] => 2
[name] => Stage 2
)
)
[1] => Array
(
[Stage] => Array
(
[id] => 3
[name] => Stage 3
)
)
)
Unfortunately $form->select('stageID', $stages, null, array(),
'Stage'); outputs some strangeness.
Is it possible to map this array in such a way so the output looks
something like the example below? Or is it a matter of passing right
query to findAll() to produce a asimpler array?
<select>
<option value="2">Stage 2</option>
<option value="3">Stage 3</option>
</select>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---