我有一个数组
http://www.postano.com/api/posts.php?ak=XXXX&ts=XXXXX&sig=XXXXX&postano=12345&start=0&count=20
我最初将获取前 20 条记录。这是课程
class social extends CI_Controller{
function data()
{
$start = $k;
$resultjson = $this->curl->simple_get("http://www.postano.com/api/posts.php?ak=XXXXX&ts=XXXXX&sig=XXXXX&postano=12345&start=$k&count=20");
$resultant_data = json_decode($resultjson,true);
foreach ($resultant_data as $key => $value)
{
//print_r($value);
$this->load->view('feeds',$value);
}
}
}
这里提要是我的看法。
我怎样才能获取接下来的 20 条记录说start or $k = 2
0 以便我可以显示结果0-20 then 21-40 and so on...
我正在尝试实现自动加载或加载更多功能。 我没有使用模型(数据库)唯一的来源是 json 响应