array(3)
{ [0]=> array(10){
["id"]=> string(2) "12"
["title"]=> string(10) "Шwqe"
["description"]=> string(22) "вывфвфывфвф"
["image"]=> string(0) ""
["dimensions"]=> string(0) ""
["data"]=> string(10) "2020-05-10"
["category_id"]=> string(1) "1"
["user_id"]=> string(2) "24"
["amount"]=> string(1) "3"
["price"]=> string(2) "59" }
[1]=> array(10) {
["id"]=> string(2) "13"
["title"]=> string(4) "2222"
["description"]=> string(8) "23123123"
["image"]=> string(14) "zpvmful5ll.jpg"
["dimensions"]=> string(7) "268x249"
["data"]=> string(10) "2020-05-10"
["category_id"]=> string(1) "1"
["user_id"]=> string(2) "24"
["amount"]=> string(1) "3"
["price"]=> string(2) "60" }
[2]=> array(10) {
["id"]=> string(2) "16"
["title"]=> string(10) "data"
["description"]=> string(4) "1121"
["image"]=> string(14) "xqgdre8ib8.jpg"
["dimensions"]=> string(7) "268x249"
["data"]=> string(10) "2020-05-11"
["category_id"]=> string(1) "6"
["user_id"]=> string(2) "24"
["amount"]=> string(1) "1"
["price"]=> string(2) "19" } }
foreach($carts as $cart){
$data = [
"title" => $cart['title'],
"description" => $cart['description'],
"image" => $cart['image'],
"dimensions" => $cart['dimension'],
"data" => date('Y-m-d'),
"category_id" => $cart['category_id'],
"user_id" => $this->auth->getUserId(),
"amount" => $cart['amount'],
"price" => $cart['price'],
];
И тут уже само PDO
}