smarty 模板的foreach嵌套
$info=$GLOBALS['db']->getAll("SELECT*FROM".DB_PREFIX."research_questionwherer_id=".$r...
$info = $GLOBALS['db']->getAll("SELECT * FROM ".DB_PREFIX."research_question where r_id=".$r_id." and type in(1,2)");
foreach($info as $k => $v){
$ans_list = $GLOBALS['db']->getAll("SELECT * FROM ".DB_PREFIX."research_reply where q_id=".$q_id); foreach($ans as $ke =>$va){
$val=$va['value'];
}
}
html
{foreach from="$info" item="item"}
$ans_list 的循环该怎么写
{/foreach} 展开
foreach($info as $k => $v){
$ans_list = $GLOBALS['db']->getAll("SELECT * FROM ".DB_PREFIX."research_reply where q_id=".$q_id); foreach($ans as $ke =>$va){
$val=$va['value'];
}
}
html
{foreach from="$info" item="item"}
$ans_list 的循环该怎么写
{/foreach} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询