• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding an array to a DB

#2
[eluser]Michael Wales[/eluser]
Well - we'll first have to iterate through your top-level array, then we can use the Active Record insert function to insert the arrays found within your top-level array.

Code:
foreach ($top_level as $child) {
  $this->db->insert('table', $child);
}


Messages In This Thread
Adding an array to a DB - by El Forum - 08-06-2007, 11:30 AM
Adding an array to a DB - by El Forum - 08-06-2007, 11:37 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.