最近幾天我一直在砸我的腦袋,因爲我一直無法爲我的問題創建解決方案。分裂/子串數組 - PHP
我有一個數組,看起來像這樣:
[0] => {"count": 1038, "previous": null, "results": [{"data_source": "f31904c94a72490e8fa5750399a14e44", "uuid": "acbb6a8790604ac9916772f51729e69a", "reference": "[email protected]", "value": "0.0000", "member": "a7cab5fa045d44beb72da3ea26e6a49c", "HPSalesBudget": "1.00", "team": null, "date": "2015-08-28T00:00:00"}
[1] => {"data_source": "f31904c94a72490e8fa5750399a14e44", "uuid": "5ba77c689aba48f8ab845c9578b96d1d", "reference": "[email protected]", "value": "0.0000", "member": "477039a270d841aaa87a5578ee034d60", "HPSalesBudget": "1.00", "team": null, "date": "2015-08-28T00:00:00"}
我要的是刪除陣列
[0] => {"count": 1038, "previous": null, "results":
的第一部分,以及品牌和數組,看起來像這樣:
Array
(
[0] => Array
(
[data_source] => f31904c94a72490e8fa5750399a14e44
[uuid] => acbb6a8790604ac9916772f51729e69a
[reference] => [email protected]
[value] => 0.0000
[member] => a7cab5fa045d44beb72da3ea26e6a49c
[HPSalesBudget] => 1.00
[team] => null
[date] => 2015-08-28T00:00:00
)
[1] => Array
(
[data_source] => f31904c94a72490e8fa5750399a14e44
[uuid] => acbb6a8790604ac9916772f51729e69a
[reference] => [email protected]
[value] => 0.0000
[member] => a7cab5fa045d44beb72da3ea26e6a49c
[HPSalesBudget] => 1.00
[team] => null
[date] => 2015-08-28T00:00:00
)
爲什麼我的數組看起來像這樣的唯一原因是因爲這是我獲取數據的格式。
我試過用google搜索這個問題,但沒有任何運氣。
有沒有人有我的問題的解決方案?
該數組是「數組」類型還是「字符串」? – kezi
我認爲你的數組字符串有什麼不對,因爲在第一行結尾的括號之後應該有一個逗號,或者至少有另一個括號關閉它...... – kezi