ホームページ >バックエンド開発 >PHPチュートリアル >Smarty で foreach またはループを使用して表示された配列を走査するソリューションを探しています
Smarty で foreach またはループを使用して、表示された配列
$this->objS->assign('coolSiteLists', $coolSiteLists);
array print_r
Array
(
[0] => 配列
(
[stpID] => 1
[stpName] => 検索
[stpSort] => 1
[stpImg] => ; z_0.gif
[サイト] => 配列
(
[0] => 配列
(
[0] => 11936
[1] => ; 百度
[2] => http://www.baidu.com/index.php?tn=5wcom_pg&ch=3
)
[1] => (
[0] => 11937
[1] => ソソ
[2] => http://www.soso.com /?unc=b400056&cid=union.s.wh
)
[2] => 配列
(
[0] => 11938
[1] => ; Sogou
[2] => http://www.sogou.com/index.php?pid=sogou-site-8725fb777f25776f
)
[3] => 🎜> (
[0] => 11939
[1] => Google
[2] => http://www.google.com .hk/webhp?prog=aff&client= pub-9491289701756083&channel=3192690012
)
[4] => 配列
(
[0] => 11940
[1 ] => Youdao
[ 2] => http://www.youdao.com/
)
[5] => 配列
(
[ 0] => 11941
[ 1] => Bing
[2] => http://cn.bing.com/
)
[6] = > 配列
(
0] => 11942
[1] => Yahoo
[2] => http://www.yahoo.cn/
)
) 🎜> )
[1] => 配列
(
[stpID] => 2
[stpName] => ショッピング
[stpSort] => 2
[stpImg] => z_19.gif
[サイト] => 配列
(
[0] => 配列
(
[0] => 11943)
[1] => タオバオ特別セール
[2] => http://www.taobao.com/go/chn/tbk_channel/onsale.php ?pid=mm_19869273_2351859_9092254&eventid=101586
)
[1] => 配列
(
[0] => 11944
[1] => net
[2] => http:// p.yiqifa.com/c?s=09594d42&w=220184&c=247&i=159&l=0&e=c&t=http://www.dangdang.com
)
[2] => 配列
(
[0] => 11945
[1] => Joyo.com