表格视图中的“包含”按钮

时间:2018-11-03 05:07:18

标签: button controller

这是我的代码,用于将一些值列出为表格

if(is_array($employeeworkschedules)){
            $i=0;
        foreach($employeeworkschedules as $employeeworkschedule){
            $i++;

            $retString .="<tr><td>".$i."</td><td>" . $employeeworkschedule['date'] . "</td><td class='hexshifttype'>" . $employeeworkschedule['shiftTypeName'] . "</td><td class='hexemployee'>" . $employeeworkschedule['employeeFName'] . "</td><td class='hexworkschedule'>" . $employeeworkschedule['workScheduleCode'] . "</td></tr>";

        }
        }
        echo $retString;

这是我的按钮代码

<button class="btn btn-outline-primary">
      <a class="edit mdi mdi-eye text-primary" href="<?php echo base_url()?>workschedule/Editemployeeworkschedule/<?php echo $employeeworkschedule['employeeWorkScheduleId'];?>">Edit</a>
</button>

我如何在上述给定代码中包含此按钮。请帮助我

1 个答案:

答案 0 :(得分:0)

if(is_array($employeeworkschedules)){
            $i=0;
        foreach($employeeworkschedules as $employeeworkschedule){


            $retString .="<tr><td>".$i."</td><td>" . $employeeworkschedule['date'] . "</td><td class='hexshifttype'>" . $employeeworkschedule['shiftTypeName'] . "</td><td class='hexemployee'>" . $employeeworkschedule['employeeFName'] . "</td><td class='hexworkschedule'>" . $employeeworkschedule['workScheduleCode'] . "</td><td <button class="btn btn-outline-primary">



            Edit
         </button> "</td></tr>";
$i++;
        }
        }
        echo $retString;