Welcome Guest, Not a member yet? Register   Sign In
result_array() turns nothing but 'array' text.
#9

[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.


Messages In This Thread
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 02:31 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 02:48 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 02:52 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 03:19 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 03:32 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 03:39 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 03:43 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 04:33 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 06:00 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 07:49 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 09:23 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 09:51 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 09:57 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 10:00 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 11:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB