[eluser]Unknown[/eluser]
Hi folks,
i have an issue about form helpers using with parser library.
you know form_dropdown accepts an array for options.
in controller:
Code:
...
$this->load->model('mcategory','c');
$this->data['categories']=$this->c->getCategoryList(); // an array with key=>value
$this->parser->parse('new', $this->data);
and view:
Code:
<?php echo form_multiselect('selCategory','{categories}','0','class="required"');?>
it produce
Code:
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: helpers/form_helper.php
Line Number: 331
getCategoryList() loaded array successfully. tested with print_r.
but it is not working. Ideas?