这是我要抓取的示例页面...
[
[4056, 1, 'Saturday, Aug 18 2012', '15:00', 171],
[4057, 1, 'Saturday, Aug 18 2012', '15:00', 94],
[4058, 1, 'Saturday, Aug 18 2012', '15:00', 175],
[4059, 1, 'Saturday, Aug 18 2012', '15:00', 29],
[4051, 1, 'Saturday, Aug 18 2012', '15:00', 13],
[4053, 1, 'Saturday, Aug 18 2012', '15:00', 170],
[4055, 1, 'Saturday, Aug 18 2012', '17:30', 23],
[4060, 1, 'Sunday, Aug 19 2012', '13:30', 194],
[4054, 1, 'Sunday, Aug 19 2012', '16:00', 16],
[4052, 1, 'Monday, Aug 20 2012', '20:00', 31],
[4123, 1, 'Wednesday, Aug 22 2012', '19:45', 15]
]
这是我通常用于类似的代码...
$str = file_get_contents('http://www.thewebsite.com/info/');
$jsonarray = json_decode($str, true);
$id = $jsonarray['id'];
但正如你所看到的......这不一样。另外,我什至不知道第一页是否是 JSON(它是一个 JS 数组,对吧?)。
我将如何从中刮取各个项目以放入变量/数组中?