您好,欢迎访问一九零五行业门户网

求用smarty中的foreach 或者 loop循环 遍历display过来的数组解决方案

求用smarty中的foreach 或者 loop循环 遍历display过来的数组
$this->objs->assign('coolsitelists', $coolsitelists);
数组print_r
array
(
  [0] => array
  (
  [stpid] => 1
  [stpname] => 搜索
  [stpsort] => 1
  [stpimg] => z_0.gif
  [sites] => array
  (
  [0] => array
  (
  [0] => 11936
  [1] => 百度
  [2] => http://www.baidu.com/index.php?tn=5wcom_pg&ch=3
  )
[1] => array
  (
  [0] => 11937
  [1] => 搜搜
  [2] => http://www.soso.com/?unc=b400056&cid=union.s.wh
  )
[2] => array
  (
  [0] => 11938
  [1] => 搜狗
  [2] => http://www.sogou.com/index.php?pid=sogou-site-8725fb777f25776f
  )
[3] => array
  (
  [0] => 11939
  [1] => 谷歌
  [2] => http://www.google.com.hk/webhp?prog=aff&client=pub-9491289701756083&channel=3192690012
  )
[4] => array
  (
  [0] => 11940
  [1] => 有道
  [2] => http://www.youdao.com/
  )
[5] => array
  (
  [0] => 11941
  [1] => 必应
  [2] => http://cn.bing.com/
  )
[6] => array
  (
  [0] => 11942
  [1] => 雅虎
  [2] => http://www.yahoo.cn/
  )
)
)
[1] => array
  (
  [stpid] => 2
  [stpname] => 购物
  [stpsort] => 2
  [stpimg] => z_19.gif
  [sites] => array
  (
  [0] => array
  (
  [0] => 11943
  [1] => 淘宝特卖
  [2] => http://www.taobao.com/go/chn/tbk_channel/onsale.php?pid=mm_19869273_2351859_9092254&eventid=101586
  )
[1] => array
  (
  [0] => 11944
  [1] => 当当网
  [2] => http://p.yiqifa.com/c?s=09594d42&w=220184&c=247&i=159&l=0&e=c&t=http://www.dangdang.com
  )
[2] => array
  (
  [0] => 11945
  [1] => 卓越网
其它类似信息

推荐信息