$this->objS->assign('coolSiteLists', $coolSiteLists);数组print_rArray
(
[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] => <font color=red>搜搜</font>
[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] => 卓越网
[2] => http://p.yiqifa.com/c?s=5e5ae424&w=220184&c=245&i=201&l=0&e=c&t=http://www.amazon.cn
) [3] => Array
(
[0] => 11946
[1] => 凡客诚品
[2] => http://www.gouwuluo.com/zt/?5w
) [4] => Array
(
[0] => 11947
[1] => 京东商城
[2] => http://p.yiqifa.com/c?s=2d61eddb&w=220184&c=4509&i=5862&l=0&e=c&t=http://www.360buy.com
) [5] => Array
(
[0] => 11948
[1] => 梦芭萨
[2] => http://www.gouwuluo.com/www/?moonbasa
) [6] => Array
(
[0] => 11949
[1] => 淘宝网
[2] => http://www.taobao.com/
) ) )
求高手用smarty 中的foreach 或者loop 遍历下 遍历时带点注释最好...
(
[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] => <font color=red>搜搜</font>
[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] => 卓越网
[2] => http://p.yiqifa.com/c?s=5e5ae424&w=220184&c=245&i=201&l=0&e=c&t=http://www.amazon.cn
) [3] => Array
(
[0] => 11946
[1] => 凡客诚品
[2] => http://www.gouwuluo.com/zt/?5w
) [4] => Array
(
[0] => 11947
[1] => 京东商城
[2] => http://p.yiqifa.com/c?s=2d61eddb&w=220184&c=4509&i=5862&l=0&e=c&t=http://www.360buy.com
) [5] => Array
(
[0] => 11948
[1] => 梦芭萨
[2] => http://www.gouwuluo.com/www/?moonbasa
) [6] => Array
(
[0] => 11949
[1] => 淘宝网
[2] => http://www.taobao.com/
) ) )
求高手用smarty 中的foreach 或者loop 遍历下 遍历时带点注释最好...
解决方案 »
- 为什么我的表单提交不了30KB以上的文件
- 在线急问:php正则中有类似js中的全局匹配符g 吗?或其它解决方法
- linux下用正则替换掉全角大写英文和全角小写英文如何写?
- 怎样取得input中输入的值?
- Undefined variable 是什么错了
- 我终于知道猪是怎么笨4的了:0 还是join.php?editid=XXX的问题!麻烦大家了:(
- 难道真的没有人能解决PHP访问ACCESS数据库的问题吗?----高手们啊,救救我吧
- 我在奥索租用的空间 那里好用吗?
- 这里用#表示什么意思呢
- 页面怎么传值给模态框 然后在模态框中显示相应ID的内容
- sessionid在cookie中无法过期的问题
- php fopen 问题求助
{foreach from=$coolSiteLists item=foo}
<li>{$foo}</li>
{/foreach}
</ul>
<{foreach item=coolSiteList from=$coolSiteLists}>
<{$coolSiteList[stpID]}>-<{$coolSiteList[stpName]}>-<{$coolSiteList[stpSort]}>-<{$coolSiteList[stpImg]}>sites:
<{foreach key=key2 item=item2 from=$coolSiteList[sites]}>
<{foreach key=key3 item=item3 from=$item2}>
<{$key3}>: <{$item3}><br>
<{/foreach}>
<{/foreach}
-----------------------------------------------------------
<{/foreach}>