猿问

php循环输出表格?

循环的数组
Array
(
    [0] => Array
        (
            [field_id] => 368
            [model] => customer
            [is_main] => 0
            [field] => age_group
            [name] => 年龄层
            [form_type] => box
        )
    [1] => Array
        (
            [field_id] => 370
            [model] => customer
            [is_main] => 0
            [field] => trade
            [name] => 客户行业
            [form_type] => box
        )
   [2] => Array
        (
            [field_id] => 374
            [model] => customer
            [is_main] => 0
            [field] => biz_scope
            [name] => 经营范围
            [form_type] => text
         )
   [3] => Array
        (
            [field_id] => 375
            [model] => customer
            [is_main] => 0
            [field] => annual_turnover
            [name] => 年营业额
            [form_type] => box
       )
)
输出表格的形式
                         <tr>
                            <td class="tdleft" width="9%">年龄层:</td>
                            <td colspan="3"  width="41%"> 25-50</td>
                            <td class="tdleft" width="9%">客户行业:</td>
                            <td colspan="3"  width="41%">医疗保健</td>
                        </tr>
                          <tr>
                            <td class="tdleft" width="9%">经营范围:</td>
                            <td colspan="3"  width="41%">医疗用品</td>
                            <td class="tdleft" width="9%">年营业额:</td>
                            <td colspan="3"  width="41%">1000万</td>
                        </tr>
请问怎么用thinkphpvolist标签循环这个数组控制一个<tr>里面如上显示?
慕尼黑的夜晚无繁华
浏览 905回答 5
5回答

素胚勾勒不出你

你这个东西只有4个,直接写死得了

慕莱坞森

把数组合成一维数组 直接输出就可以了
随时随地看视频慕课网APP
我要回答