我有一個問題要問你,我需要通過在PHP中其他數組的數組,但我只通過最後一個數組,我的數組是:通過在PHP與其他數組的數組
Array
(
[0] => Array
(
[syn_id] => 17070
[syn_label] => fd+dfd
)
[1] => Array
(
[syn_id] => 17068
[syn_label] => fds+dsfds
)
[2] => Array
(
[syn_id] => 17069
[syn_label] => klk+stw
)
)
我的PHP :?
$a_ddata = json_decode(method(), true);
foreach ($a_ddata as $a_data)
{
$a_data['syn_label'] = urldecode(utf8_decode($a_data['syn_label']));
}
有了這個代碼,我只通過最後一個數組[2],但如何通過陣列請幫我 我需要得到數組:
Array
(
[0] => Array
(
[syn_id] => 17070
[syn_label] => fd dfd
)
[1] => Array
(
[syn_id] => 17068
[syn_label] => fds dsfds
)
[2] => Array
(
[syn_id] => 17069
[syn_label] => klk stw
)
)
顯示我們預期的結果。 – 2014-09-02 12:48:37
每次迭代都會覆蓋您的值。 – Daan 2014-09-02 12:48:46
我編輯了問題 – 2014-09-02 12:50:08