PHP Multiple Modal in a button of while loop gives duplicate of previous raw ID

below code works fine, but I find out repeated value, please check attached images

?

<td>

    <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModalRemarks<?php echo $row['element_101'];?>">Go Forward</button>

    <!--    <a href="#myModalRemarks<?php echo $row['element_101'];?>" class="remarksBtn" data-toggle="modal"><i class="fa fa-info-circle fa-lg">Go Forward</i></a> -->

    <div class="modal fade" id="myModalRemarks<?php echo $row['element_101'];?>" role="dialog">
        <div class="modal-dialog">
            <!-- Modal content -->
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">Remarks</h4>
                </div>
                <div class="modal-body">
                    <?php echo $row['element_101']; ?> <?php echo $row['lc_id']; ?>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>
       </div>
    </div>                  

</td>

What are the values in these two variables?

<?php echo $row['element_101']; ?> <?php echo $row['lc_id']; ?>

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.