0
我試圖做一個,而在我的多維數組是這樣的:循環使用,同時具有多維數組PHP
$address = array();
while(!$res->EOF)
{
$dataFromDB = array($res->fields['CODCLI'] =>
array(
"Address" => $res->fields['CIDCLI'].",".$res->fields['SIGUFS'].", USA",
"Name" => "SOMENAME")
);
$address[] = $dataFromDB;
$res->MoveNext();
}
,結果是這樣的:
Array
(
[0] => Array
(
[28947] => Array
(
[Address] => PIRIPIRI,PI,USA
[Name] => SOMENAME
)
)
)
但我真的需要的是這樣:
Array
(
[1] => Array
(
[Address] => PIRIPIRI,PI,USA
[Name] => SOMENAME
)
)
我嘗試了一些其他的東西,但沒有幫助我,我失蹤了?
其實'codcli'具有值我的錯誤上張貼 –