php smarty 循环问题
数组显示如下:Array([CORPORATE]=>Array([0]=>中国CompanyProfile[1]=>LeadersinSealingIntegrityan...
数组显示如下:
Array
(
[CORPORATE] => Array
(
[0] => 中国Company Profile
[1] => Leaders inSealing Integrity and a Culture of Safety
[2] => Application Engineering
[3] => New Event
)
[MARKETS] => Array
(
[0] => English
[1] => YeNan
[2] => Chinese
)
)
如何用smarty的foreach循环出来;
效果是:CORPORATE(父类)
中国Company Profile
(子类) Leaders inSealing Integrity and a Culture of Safety
Application Engineering
MARKETS
English 展开
Array
(
[CORPORATE] => Array
(
[0] => 中国Company Profile
[1] => Leaders inSealing Integrity and a Culture of Safety
[2] => Application Engineering
[3] => New Event
)
[MARKETS] => Array
(
[0] => English
[1] => YeNan
[2] => Chinese
)
)
如何用smarty的foreach循环出来;
效果是:CORPORATE(父类)
中国Company Profile
(子类) Leaders inSealing Integrity and a Culture of Safety
Application Engineering
MARKETS
English 展开
1个回答
2013-05-28
展开全部
$CORPORATE=array [CORPORATE];
foreach($CORPORATE as $value)
{
echo $value;
}
foreach($CORPORATE as $value)
{
echo $value;
}
更多追问追答
追问
不是只循环一个,是要全部都循环出来,我只是给出部分的例子而已,每个key 里面的value都不一样的数量。
追答
';
}
?>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询