weixin_33681778 2017-07-22 11:36 采纳率: 0%
浏览 26

无休止的数组数据分页

I have a large array with over 500 entries. The structure is like that:

      Array
      (
      [result] => Array
      (
         [mounts] => Array
            (
                [0] => Array
                    (
                        [name] => Test0
                        [spellId] => 230401
                        [creatureId] => -73991
                        [itemId] => 142369
                    )

                [1] => Array
                    (
                        [name] => Test1                           
                        [spellId] => 61447
                        [creatureId] => 32213
                        [itemId] => 44234
                    )

                    .....

I get the array datas with foreach like that:

               foreach ($r['result']['mounts'] as $item) echo '
                    <li class="span3 clearfix" data-tag=', 
                    $item['qualityId'], '>
                    ', $item['name'], '.
                    </li>';
                    echo '

I want an endless paging. So when the user reaches the end of the page and scrolls down it should load the next datas.

I know there are some plugins for endless paging, but I don´t get them to work with datas out of an array. Do you have any tips for a simple solution?

  • 写回答

1条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥30 如何降低hdfs中datanode的JVM内存用量
      • ¥15 Android URL如何转成视频/音频,可行吗?
      • ¥20 SQL数据查询,子查询
      • ¥15 c++字符串分割问题
      • ¥15 关于#sql#的问题:没有用命令关闭cdc,手动把系统表开启的cdc右键删除了
      • ¥15 vue+uniapp
      • ¥15 android freedom
      • ¥15 使用自定义的类型代替内置类型可行吗
      • ¥15 关于STM32的SPI和ENDAT接口编码器通信的问题
      • ¥15 关于#pdfbox#生成的PDF文件正常,转图片中文乱码的问题,如何解决?