1
我已經在以下格式的數組插入associaitve陣列雖然模型CI
Array
(
[0] => Array
(
[31] => Battery Diagnostic
)
[1] => Array
(
[31] => Spare Tire Installation
)
[2] => Array
(
[31] => ABS Light is on Inspection
)
[3] => Array
(
[31] => Air filter is clogged Inspection
)
[4] => Array
(
[31] => Adjust Windshield Washer Jets
)
)
這是我的模型
function services_get_a_quote($data){
echo "<pre>";
print_r($data);
echo "</pre>";
foreach ($data as $key => $item){
//$this->db->insert("services_get_a_quote",$data[]=array("key"=>"value"));
echo $key;//prints ok
echo $item['Array']; //prints error
}
}
i灣生成查詢通過插入兩個鍵和值到分貝因爲這個數組有一個外鍵和一個與它相關的值! 現在我已經在這個問題一段時間了,現在我似乎無法得到數組的值,例如Battery Diagnostic
我在哪裏做錯了?
的當前鍵試試這個'回聲電流($項目);' –
什麼是當前的? –
http://php.net/manual/en/function.current.php –