我在$ _ POST一個有些價值是在有自己的數組中與此類似,
array(
['conviction_date'] = array(
[0] => 12/01/2011
[1] => 22/12/2011
)
['conviction_description'] = array(
[0] => This some text to show what the conviction was for etc.
[1] => This is some more text to show what the second convication was for
)
)
我想知道什麼是我該怎麼辦環通說數組,以便我可以通過那些鍵來從一個值到另一個值的匹配?
是不是這樣簡單,
foreach ($_POST['conviction_date'] as $k => $v) {
$newArray[] = array(
'conviction_date' => $v,
'conviction_details' => $_POST['conviction_details'][$k]
)
}
這會不會再輸出的東西下面?
array(
[0] => array(
'conviction_date' => 12/01/2011
'conviction_details' => This is some to show what the conviction was for etc.
),
[1] => array()
'conviction_date' => 22/11/2011
'conviction_details' => This is some more text to show what the second convication was for
)
有沒有建立一個更簡單的數組?
你到處都是「定罪」和「定罪」(這不是一個真正的單詞)拼寫不匹配。所以開始了意大利麪條...... –