-4
JSON格式我有這樣更改陣列值在PHP
Array
(
[0] => [{"qty":"4023","discount":"-288.84000194072723"}]
[1] => [{"qty":"48","discount":"-1"}]
[2] => [{"qty":"305","discount":"0"}]
)
數組如何將這些數組轉換爲我的格式一樣
[{"name":"qty","data":[4023,48,305]},{"name":"discount","data":[-288.84,-1,0]}]
如何解決這個問題呢?
你知道http://www.php.net/manual/en/function.json-encode.php? – HerrSerker
想讓我們爲你google? – TigOldBitties
我爲您發佈了我的解決方案問題,它不工作? – vikingmaster