Select's Option Values are static & i want it dynamic
Right now is static. as per below line
<?echo $this->Form->input('intaddressid',
array(
'options' =>
array('add1static,add1static' => 'add1static,add1static',
'addres2static,add2stattic'=>'addres2static,add2stattic'),
'label'=>false,
'empty' => '(Select hotel and time)',
'class' => 'form-control border_none'
)
);
?>
My static field output https://www.dropbox.com/s/6133d4e9aorpo33/Selection_047.png?dl=0
And if i set for each then my dynamic https://www.dropbox.com/s/v3hfhfaubkfr62m/Selection_048.png?dl=0
But i want it only in 1 field all value so help on it
I used for each times as time and my table value generated but now i want this value in above my static code. value => add1,add2 = add1,add2
$times['Time']['varaddress1']
$times['Time']['varaddress2']
my updated code is ->
$arr1=array();
$arr2=array();
$arr1 = $this->Time->find('list', array(
'fields' => array('varaddress1'),'order'=> array('Time.varaddress1')
));
$arr2 = $this->Time->find('list', array(
'fields' => array('varaddress2'),'order'=> array('Time.varaddress2')
));
$finalArr=array_merge ($arr1,$arr2);
$this->set('time',$finalArr);
and in ctp i used
'options' => $time