product_list循环里如何调用defined 循环?

创建时间:2020-06-27 00:33发布者:招投标资质网点击数:1345
product_category.php里

$product_list[] = array (
"id" => $row['id'],
"cat_id" => $row['cat_id'],
"name" => $row['name'],
"price" => $price,
"thumb" => $dou->dou_file($row['image'], true),
"image" => $dou->dou_file($row['image']),
"defined" => $dou->format_defined($row['defined']),
"add_time" => $add_time,
"add_time_short" => $add_time_short,
"add_time_year" => $add_time_year,
"add_time_day" => $add_time_day,
"summary" => $row['summary'],
"description" => $description,
"url" => $url
);


// 获取产品信息
$product = $dou->get_row('product', '*', "id = '$id'");
$smarty->assign('defined', $dou->format_defined($product['defined']));

product_category.dwt里

<!-- {foreach from=$product_list name=product_list item=product} -->
<h4>{$product.name}</h4>
<!-- {foreach from=$defined name=defined item=defined} -->{$defined.arr}:{$defined.value}<!-- {/foreach} -->
<!-- {/foreach} -->
回答 我也遇到这个问题(0)
招投标资质网2020-06-27 12:34回答
<!-- {foreach from=$defined name=defined item=defined} -->{$defined.arr}:{$defined.value}<!-- {/foreach} --> 不生效
有用(0) 没用(0)