smarty foreach二维数组循环的问题
$blog['title']=$title['1'];$blog['list']=$list['1'];print_r($blog);以下结果Array([title]=...
$blog['title'] = $title['1'];
$blog['list'] = $list['1'];
print_r($blog);以下结果
Array
(
[title] => Array
(
[0] => [转]取名字的宝典~
[1] => 迷失的梦
[2] => 梦,会成为一种现实吗
[3] => 把辛酸、腐烂在心底
)
[list] => Array
(
[0] => 个人日记
[1] => 个人日记
[2] => 个人日记
[3] => 个人日记
)
)
$smarty->assign("blog", $blog);
如何用foreach或section做循环? 展开
$blog['list'] = $list['1'];
print_r($blog);以下结果
Array
(
[title] => Array
(
[0] => [转]取名字的宝典~
[1] => 迷失的梦
[2] => 梦,会成为一种现实吗
[3] => 把辛酸、腐烂在心底
)
[list] => Array
(
[0] => 个人日记
[1] => 个人日记
[2] => 个人日记
[3] => 个人日记
)
)
$smarty->assign("blog", $blog);
如何用foreach或section做循环? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询