PHP Laravel recursive function with nested array
问题 I am using Laravel 4 with MySQL back-end. I want to store records of a nested array into database using recursive function . The input array is as below : Array ( [0] => Array ( 'id' => 561, 'type' => 'q', 'subtype' => 'boolean', 'title' => 'Did you..?', 'parent' => 560, 'created_at' => '2014-07-09 09:45:50', 'updated_at' => NULL, 'deleted_at' => NULL, 'children' => Array ( [0] => Array ( 'id' => 562, 'type' => 'o', 'subtype' => NULL, 'title' => 'Yes', 'parent' => 561, 'created_at' => '2014