有點幫助我怎樣才能使用這個數組創建一個輸入查詢?或者如何將 傳遞給表格?我的表佈局示例是這樣的:多維數組Mysql Codeigniter
sales_table
id | product_name | price | qty | subtotal
這是從的var_dump()函數導出。
這是我在陣列碼
//array code from unserialized function
$products = unserialize($this->session->userdata('product_list'));
//This is the output.
Array
(
[2] => Array
(
[id] => 2
[product_name] => NOKIA 5110
[product_desc] => Cellphone
[product_price] => 500.00
[product_qty] => 1
[product_amount] => 500
[product_code] => NOKI2012-84353
)
[3] => Array
(
[id] => 3
[product_name] => HP IPAQ RW6828
[product_desc] => Cellphone
[product_price] => 1500.00
[product_qty] => 1
[product_amount] => 1500
[product_code] => HP I2012-08386
)
)
你怎麼得到'product_list'? –