0
我想請求幫助。在PHP中解析方括號和嵌套括號
我這句法
[86855,[[6615663,"Name 1 [GBR]","Name 2 [RUS]",86855,"2017-01-13T09:30:00.0000000",[[16942762,0,,,,1],[16942763,738,,,,2],[16942869,741,,,,1],[16942870,113,,,,1],[16944801,759,,,1],[16944804,759,,,2],[16943142,740,,,,1],[16943144,743,,,,5],[16943145,744,,,,5]],[[25262023,758],[25259130,748],[25259131,749],[25258578,739]],,,,,80104,194132,-1,-1,0,0,0,0,"Sport","League",6,22,0,null,"10890680"],[6614528,"Name 1 [SRB]","Name 2 [LUX]",86855,"2017-01-13T05:00:00.0000000",[[16939629,741,,,,1],[16939630,113,,,,1],[16939632,759,,,1],[16939634,759,,,2],[16939069,0,,,,1],[16939070,740,,,,1],[16939071,738,,,,2],[16942414,743,,,,5],[16942415,744,,,,5]],[[25257607,748],[25257608,749],[25257609,758],[25253011,739]],,,,,1610,48295,-1,-1,0,0,0,0,"Sport","League",6,22,0,null,"10888520"]],[[25138199,8,,,,"2017-01-13T05:00:00.0000000",,,,0,null,null]]],[]
,我想從輸出獲取數組。像這樣的東西
[0] => 86855
[0] =>
[0] => 6615663
[1] => "Name 1 [GRB]"
etc...
[1] =>
[0] => 6614528
[1] => "Name 1 [SRB]"
etc...
是否有可能通過任何章節做到這一點。表達或解析不知何故?
謝謝:)
它看起來像兩個有效的JavaScript數組 –
那麼,有沒有辦法如何解析那些JS數組到PHP? – Ernesto
你是如何得出結論尋找正則表達式的;鑑於你沒有嘗試過自己的?爲什麼不詳細說明數據源?你知道,這看起來非常像一個廣泛存在的解析器的數據格式。 – mario