[eluser]DarkManX[/eluser]
Code:
foreach($a as $row)
{
$b = array(
'ref_code' => $ref_code,
'ref_desc' => $ref_des
);
}
well this stuff... $ref_code and $ref_des are not set, thats why you get the undefined error. what do you except to be in these vars? you but nothing there
result() returns an array with all matched data rows as objects
result_array() return an array with all matched data rows as array
so with result() you would want to grab like that $result_return[0]->column;
with the result_array() you have to grab it like that $result_return[0]['column']
just var_dump the stuff you get from the functions, then you can see which kind of stuff you have in these vars and then you can access the data.