0
我想$店數組中創建新實例添加新的數組,像這樣:PHP在二維數組
list1 = array("rose" , 1.25 , 15);
$list2 = array("daisy", 0.75 , 25);
$list3 = array("orchid", 1.15 , 7);
$list4 = array("orchid1", 2.15 , 9);
$shop = array($list1 ,
$list2 ,
$list3
);
//something like the line bellow
$shop = $shop + array(array($list4));
echo $shop[3][0];
當我執行這個代碼,我面對這個錯誤信息:
注意:未定義偏移量:3在C:\ XAMPP \ htdocs中\ array.php上線13
線13:$店= $店+陣列(陣列($ list4));
在此先感謝^^
$店[] = $ list4 – 2013-05-12 23:59:56