私は配列を持っています
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);
}
}
}
ここでフィードは私の見解です。
start or $k = 2
結果を表示できるように、次の 20 レコードを取得して 0と言うにはどうすればよいですか?0-20 then 21-40 and so on...
autoloadまたはloadmore機能 を実装しようとしています。私はモデル(データベース)を使用していません。唯一のソースはjson応答です