Laravel 表中的动态行跨度问题产品变体

问题描述

以原始输出为例:

然后我想要这样的 rowspan

数组代码

这是我的 Laravel 代码


foreach ($color as $key => $val) {
    foreach ($size as $key1 => $val1) {
        $data .=
            '<tr>
        <td style="text-align:center;">
        <input class="" type="checkBox" id="blankCheckBox" value="option1" aria-label="...">
         </td>
            <td class="py-1">' . $key1 . '</td> 
            <td>' . strtoupper($val) . '</td>
            <td>' . strtoupper($val1) . '</td>
            <td>' . ($same_price_flag === true ? '' : '<input type="number" class="form-control" autocomplete="off">') . '</td>
            <td>' . ($same_price_flag === true ? '' : '<input type="number" class="form-control" autocomplete="off">') . '</td>
            <td>' . ($same_price_flag === true ? '' : '<input type="number" class="form-control" autocomplete="off">') . '</td>
            <td>' . ($same_price_flag === true ? '' : '<input type="number" class="form-control" autocomplete="off">') . '</td>
            <td><input type="text" class="form-control" autocomplete="off"></td>
            <td><input type="number" class="form-control" autocomplete="off"></td>
            <td><input type="number" class="form-control" autocomplete="off"></td>
        </tr>
            ';
    }
}

}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)