怎样得到循环的序号?

#1 phpcaicai

我想得到循环列表的序号,不是ID
比如 $this->aclist = $aclCateObj->findAll(NULL,"id ASC");
想得出结果是:
  • 1. 新闻随碟附送电费

  • 2. 金砂东路附件快乐的时间

  • 3. 即将来临看见了

  • 4. 史蒂芬史蒂芬林家栋饰留空

  • 5. 中兄次之想操

  • 就是前面循环出序号12345.....,在speedphp中怎么实现?






    2010-05-20 22:35:57

    #2 azwl

    用smarty的for循环

    2010-05-20 22:51:56

    #3 jake

    foreach的序号
    http://speedphp.com/doc/smarty/foreach.property.iteration.html
    section的序号
    http://speedphp.com/doc/smarty/section.property.iteration.html

    2010-05-21 08:37:53