-1
进出口新的PHP和我做了这个展示给我的网站是什么已经在FDPP门户使用的foreach做一个表
<?php $resp = file_get_contents("http://fdpp.blgs.gov.ph/api/documents?source=datatable&sSearch=kalinga");
$clean = json_decode($resp);
print_r($clean); ?>
这被上传的是结果:
stdClass Object
(
[iTotalRecords] => 130035
[iTotalDisplayRecords] => 879
[sEcho] => 0
[aaData] => Array
(
[0] => stdClass Object
(
[lgu] => <a href=' http://fdpp.blgs.gov.ph/documents/view/129293'>CAR<br/>Kalinga<br />Balbalan</a>
[document] => <a href=' http://fdpp.blgs.gov.ph/documents/view/129293'>Local Disaster Risk Reduction and Management Fund Utilization (LDRRMF)</a>
[period] => Quarter 1 2014
[status] => Required • SUBMITTED
[desc] => The atng.
)
[1] => stdClass Object
(
[lgu] => <a href=' http://fdpp.blgs.gov.ph/documents/view/129188'>CAR<br/>Kalinga<br />Balbalan</a>
[document] => <a href=' http://fdpp.blgs.gov.ph/documents/view/129188'>Manpower Complement</a>
[period] => Quarter 1 2014
[status] => Required • SUBMITTED
[desc] => The file ag.
)
什么我应该添加到我的代码中,把它放在列名为lgu,document,period的表中吗?我尝试阅读foreach手册,但我无法弄清楚有人可以帮我吗?
没有你的尝试,并告诉我们你卡在哪里,这几乎不可能帮助你。 – PeeHaa
澄清,似乎他试图在服务器端处理中使用jQuery DataTables库。 [这是一个例子](http://datatables.net/examples/server_side/simple.html)。 – mason