工作,我必須分配一個多頭排列的笨會話,但它不工作。如果我使用三個四元素的數組,那麼這項工作。我的數組如下。笨會話不與多頭排列
$value['id'] = $checkout_product['checkout']['id'];
$value['user_id'] = $checkout_product['checkout']['user_id'];
$value['name'] = $checkout_product['checkout']['name'];
$value['maker'] = $checkout_product['checkout']['maker'];
$value['model'] = $checkout_product['checkout']['model'];
$value['color'] = $checkout_product['checkout']['color'];
$value['size'] = $checkout_product['checkout']['size'];
$value['slug'] = $checkout_product['checkout']['slug'];
$value['route_id'] = $checkout_product['checkout']['route_id'];
$value['description'] = $checkout_product['checkout']['description'];
$value['quantity'] = $checkout_product['checkout']['quantity'];
$value['p_units'] = $checkout_product['checkout']['p_units'];
$value['images'] = $checkout_product['checkout']['images'];
$value['label_type'] = $checkout_product['checkout']['label_type'];
$value['product_type'] = $checkout_product['checkout']['product_type'];
$value['auction_id'] = $checkout_product['checkout']['auction_id'];
$value['product_id'] = $checkout_product['checkout']['product_id'];
$value['budget_min'] = $checkout_product['checkout']['budget_min'];
$value['budget_max'] = $checkout_product['checkout']['budget_max'];
$value['bid_start_date'] = $checkout_product['checkout']['bid_start_date'];
$value['bid_end_date'] = $checkout_product['checkout']['bid_end_date'];
$value['status'] = $checkout_product['checkout']['status'];
$value['bid_id'] = $checkout_product['checkout']['bid_id'];
$value['bidder_id'] = $checkout_product['checkout']['bidder_id'];
$value['bid_product_id'] = $checkout_product['checkout']['bid_product_id'];
$value['bid_date'] = $checkout_product['checkout']['bid_date'];
$value['bid_qty'] = $checkout_product['checkout']['bid_qty'];
$value['bid_amount'] = $checkout_product['checkout']['bid_amount'];
$value['total_amount'] = $checkout_product['checkout']['total_amount'];
$value['payable_amount'] = $checkout_product['checkout']['payable_amount'];
$value['shipping_in'] = $checkout_product['checkout']['shipping_in'];
$value['shipping_method'] = $checkout_product['checkout']['shipping_method'];
$value['shipping_amount'] = $checkout_product['checkout']['shipping_amount'];
$value['pro_type'] = $checkout_product['checkout']['pro_type'];
$value['warranty_month'] = $checkout_product['checkout']['warranty_month'];
$value['warranty_type'] = $checkout_product['checkout']['warranty_type'];
$value['bid_note'] = $checkout_product['checkout']['bid_note'];
$value['bid_status'] = $checkout_product['checkout']['bid_status'];
$value['customer_id'] = $checkout_product['checkout']['customer_id'];
$value['customer_username'] = $checkout_product['checkout']['customer_username'];
$value['customer_firstname'] = $checkout_product['checkout']['customer_firstname'];
$value['customer_lastname'] = $checkout_product['checkout']['customer_lastname'];
$value['customer_email'] = $checkout_product['checkout']['customer_email'];
$value['customer_image'] = $checkout_product['checkout']['customer_image'];
$this->session->set_userdata('checkout', $value);
此代碼不適用於我。請幫助我如何在codeigniter的會話中張貼大數組。
我會使用數據庫來存儲會話:https://ellislab.com/codeigniter/user-guide/libraries/sessions.html此外,它看起來就像你正在做一個購物車。你看過CI的內置車類嗎? https://ellislab.com/codeigniter/user-guide/libraries/cart.html – versalle88 2014-12-03 13:27:42