I want to combine two lists of news in an select-field. Something
like:
<select name='mylist'>
<option value='123' class='new'>latest news</option>
<option value='234' class='new'>latest news2</option>
<option value='567' class='old'>older news</option>
<option value='789' class='old'>older news2</option>
</select>
The both different lists I will get width find()-questions with
different conditions.
To make the select field in the written form, I need an array like
$mylist = array (
0 => array('value'=>123, 'name'=>'latest news',
'class'=>'new'),
1 => array('value'=>234, 'name'=>'latest news2',
'class'=>'new'),
2 => array('value'=>567, 'name'=>'older news',
'class'=>'old'),
3 => array('value'=>789, 'name'=>'older news2',
'class'=>'old')
);
Here my questions:
can I construct an array like abough with Set::combine?
(If I use find('list') or find('all') and set::combine() I get an
array like $mylist = array('123'=>'latest news');
Any ideas?
Thanks for Your help!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---