[eluser]the_unforgiven[/eluser]
Hi Guys,
I have this code in one of me view files:
Code:
<?php
$values = $this->db
->select('ProductID, Product')
->get('tblProduct')
->result_array();
$options = array();
//loop over the retrieved results
foreach($values as $value)
{
$options = $value['Product'];
}
return $options;
?>
But when I call it via the dropdown like so:
Code:
<tr><td>Product:</td><td><?php echo form_dropdown('Product', $options['Product'], set_value('Product')); ?></td></tr>
It just shows nothing but a blank page like I have missed a ; or something but haven't but yet when i do print($options); all the options are there, so any idea's why it doesn't work in my dropdown menu?