[eluser]datguru[/eluser]
Hey thanks for the reply Mike, that has indeed solved the problem of populating the array. The only issue now is that it is giving me an array of arrays, so when I go to fill the form_dropdown with the options it gives me the options of Array, Array, Array.... Is there a better way to dynamically fill the form_dropdown()?
Thanks again
Edit: Found a solution....
What I did was the following...
Code:
$tmp2 = array() //Needs to be an array type otherwise the first merge will not work
foreach($suppliers as $row)
{
$tmp = array( $row->supplier_id => $row->supplier_name);
$tmp2 = array_merge($tmp,$tmp);
}
$data['options'] = $tmp2;
Thanks again Mike without your help would not of got there.
Cheers
Chris