搜索
系统检测到您的用户名不符合规范:

volist 怎么循环读取2个关联的表 数组

浏览:1651 发布日期:2015年08月31日 分类:求助交流
下面 两个数组 :

array(3) {
[0] => array(1) {
[0] => array(8) {
["recno"] => string(2) "19"
["m_recno"] => string(2) "61"
["cdcode"] => string(5) "41038"
["cmdtync"] => string(24) "嘟嘟王牌淡彩唇膏"
["urlpic"] => NULL
["cmdtyspec"] => string(0) ""
["unit"] => NULL
["qty"] => string(1) "0"
}
}
[1] => array(1) {
[0] => array(8) {
["recno"] => string(2) "18"
["m_recno"] => string(2) "60"
["cdcode"] => string(5) "41037"
["cmdtync"] => string(24) "我爱画画丰唇蜡笔"
["urlpic"] => NULL
["cmdtyspec"] => string(0) ""
["unit"] => NULL
["qty"] => string(1) "1"
}
}
[2] => array(2) {
[0] => array(8) {
["recno"] => string(2) "20"
["m_recno"] => string(2) "62"
["cdcode"] => string(5) "61178"
["cmdtync"] => string(21) "飞越出界睫毛膏"
["urlpic"] => NULL
["cmdtyspec"] => string(0) ""
["unit"] => NULL
["qty"] => string(1) "1"
}
[1] => array(8) {
["recno"] => string(2) "21"
["m_recno"] => string(2) "62"
["cdcode"] => string(5) "41038"
["cmdtync"] => string(24) "嘟嘟王牌淡彩唇膏"
["urlpic"] => NULL
["cmdtyspec"] => string(0) ""
["unit"] => NULL
["qty"] => string(1) "1"
}
}
}
array(3) {
[0] => array(26) {
["recno"] => string(2) "61"
["saletypeid"] => string(1) "4"
["bcmdtybrand"] => string(12) "周末计划"
["salename"] => string(0) ""
["bcmdty"] => NULL
["bcmdtyimg"] => NULL
["bplu"] => NULL
["bcdcode"] => string(5) "61178"
["bcmdtync"] => string(21) "飞越出界睫毛膏"
["bcmdtyspec"] => string(0) ""
["bqty"] => string(1) "1"
["bbzunit"] => NULL
["bunit"] => NULL
["sale_u_p"] => string(1) "0"
["bbztype"] => NULL
["bcmdtyclass"] => NULL
["salecontent"] => NULL
["salearea"] => NULL
["saletarget"] => NULL
["salestate"] => string(1) "1"
["u_p"] => string(2) "69"
["memo"] => NULL
["salestart"] => NULL
["saleend"] => NULL
["moq"] => string(3) "500"
["input_d"] => NULL
}
[1] => array(26) {
["recno"] => string(2) "60"
["saletypeid"] => string(1) "4"
["bcmdtybrand"] => string(12) "周末计划"
["salename"] => string(29) "69元买睫毛膏送眼线膏"
["bcmdty"] => NULL
["bcmdtyimg"] => NULL
["bplu"] => NULL
["bcdcode"] => string(5) "62018"
["bcmdtync"] => string(27) "引爆电力嫁接睫毛膏"
["bcmdtyspec"] => string(0) ""
["bqty"] => string(1) "1"
["bbzunit"] => NULL
["bunit"] => NULL
["sale_u_p"] => string(2) "69"
["bbztype"] => NULL
["bcmdtyclass"] => string(6) "彩妆"
["salecontent"] => NULL
["salearea"] => NULL
["saletarget"] => NULL
["salestate"] => string(1) "1"
["u_p"] => string(2) "38"
["memo"] => NULL
["salestart"] => NULL
["saleend"] => NULL
["moq"] => string(3) "200"
["input_d"] => NULL
}
[2] => array(26) {
["recno"] => string(2) "62"
["saletypeid"] => string(1) "6"
["bcmdtybrand"] => string(12) "周末计划"
["salename"] => string(2) "66"
["bcmdty"] => NULL
["bcmdtyimg"] => NULL
["bplu"] => NULL
["bcdcode"] => string(5) "62018"
["bcmdtync"] => string(27) "引爆电力嫁接睫毛膏"
["bcmdtyspec"] => string(0) ""
["bqty"] => string(3) "200"
["bbzunit"] => NULL
["bunit"] => NULL
["sale_u_p"] => string(2) "69"
["bbztype"] => NULL
["bcmdtyclass"] => string(6) "彩妆"
["salecontent"] => NULL
["salearea"] => NULL
["saletarget"] => NULL
["salestate"] => string(1) "1"
["u_p"] => string(2) "38"
["memo"] => NULL
["salestart"] => NULL
["saleend"] => NULL
["moq"] => string(3) "200"
["input_d"] => NULL
}
}


想用 volist 循环显示出来

其中 : 主表的 recno = 细表的 m_recno ;

<volist name="list_d" id="vo_d" key='j' >
<tr>

<td><{$vo_d[0].cmdtync}></td>
<td><{$vo_d[0].qty}></td>
<td><{$j}></td>

</tr>
</volist>


最佳答案
评论() 相关
后面还有条评论,
评论支持使用[code][/code]标签添加代码
您需要登录后才可以评论 登录 | 立即注册
收藏
鹏程
积分:681 等级:LV2
热点推荐
(追記) (追記ここまで)
最新更新

我们

合作

网站

信息

ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。并且拥有众多的原创功能和特性,在社区团队的积极参与下,在易用性、扩展性和性能方面不断优化和改进,已经成长为国内最领先和最具影响力的WEB应用开发框架,众多的典型案例确保可以稳定用于商业以及门户级的开发。

AltStyle によって変換されたページ (->オリジナル) /