-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