Welcome Guest, Not a member yet? Register   Sign In
logging a structure
#1

(This post was last modified: 07-22-2018, 12:17 AM by richb201.)

I have an array of two structures that have "arrived" from a remote application. Looking at one of the two structures I have:

$data = array(
   'task1' => $Arr[0].Task_0,
   'task1_percent' => $Arr[0].Perc_time_0,
   'task2' => $Arr[0].Task_1,
   'task2_percent' => $Arr[0].Perc_time_1,
   'task3' => $Arr[0].Task_2,
   'task3_percent' => $Arr[0].Perc_time_2,
   'task4' => $Arr[0].Task_3,
   'task4_percent' => $Arr[0].Perc_time_3,
   'task5' => $Arr[0].Task_4,
   'task5_percent' => $Arr[0].Perc_time_4,
   'task6' => $Arr[0].Task_5,
   'task6_percent' => $Arr[0].Perc_time_5,
   );



This is not working correctly. When I look at $data I see that it task1 has the string "Task_0" instead of the value of Task_0. I am looking to log all the values into a table. My table has the structure attached. What is the easy way to do this? I realize that once I get it into the array I need to use $this->db->insert('activity_log',$data);

Attached Files Thumbnail(s)
   
proof that an old dog can learn new tricks
Reply


Messages In This Thread
logging a structure - by richb201 - 07-22-2018, 12:13 AM
RE: logging a structure - by Pertti - 07-22-2018, 03:03 AM
RE: logging a structure - by richb201 - 07-22-2018, 10:07 AM
RE: logging a structure - by richb201 - 07-23-2018, 07:35 AM
RE: logging a structure - by Pertti - 07-23-2018, 08:03 AM
RE: logging a structure - by richb201 - 07-24-2018, 04:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB