-4
如果我的數據是這樣的,我將如何使用php插入到mysql中?插入mysql數據
array(
[template] => template2
[quote] => 001
[date] => 01 December 2016
[referenceno] =>
[q_cust_name] => 0
[q_cat_name] => Array
(
[0] => drugs
[1] => oil
)
[p_name] => Array
(
[0] => Paracetamol
[1] => liquid nitrogen
)
[quot_per_unit] => Array
(
[0] => 600/gram
[1] => 500/liter
)
[quot_des] => Array
(
[0] => Cures fever. Use only in case of high fever
[1] => Hazardous Product.
)
[quot_price] => Array
(
[0] => 150.00
[1] => 7500.00
)
[quot_req_qty] => Array
(
[0] => 10
[1] => 10
)
)
我試過使用for循環 –
請爲他人提供足夠的信息來了解您的問題。像表結構(databse)等 –
爲我們提供一個映射,PHP數組中的哪一列應該到你表中的哪一列... – masterFly