-4
我有一個字符串,它看起來像:如何爆炸這個數組並顯示給調用變量?
$string = "12,32,23,32-23X.12,32,23,32-20X";
我怎樣才能把這個字符串轉換像一個數組:
Array (
[0] => Array (
[0] => Array (
[0] => 12
[1] => 32
[2] => 23
[3] => 32
)
[1] => 23X
)
[1] => Array (
[0] => Array (
[0] => 11
[1] => 31
[2] => 21
[3] => 31
)
[1] => 20X
)
)
和結果將是:
12:23X
32:23X
23:23X
32:23X
11:20X
31:20X
21:20X
31:20X
你嘗試過什麼嗎?這不是發佈作業的地方! –
你不必像你給 – Prakash
從數據的任何其中[0] =>數組( [0] => 11 [1] => 31 [2] => 21 [3] => 31 )來到 –