<?php
    global $gAr;
    foreach($gAr as $k=>$v){${$k}=$v;}
?>
 
<table class="table table-borderd">
    <thead>
        <tr>
            <td>#</td>
            <td>Name</td> 
            <td>Mobile</td> 
            <td>Username </td> 
            <td>Action </td> 
        </tr>
    </thead>
    <tbody class="details_products">
        <?php
            $sr=1;
            foreach($users as $u){ 
            ?>
            <tr>
                <td><?=$sr++?></td>
                <td><?=$u['name']?></td>
                <td><?=$u['mobile']?></td>
                <td><?=$u['username']?></td>
                <td><input <?php if(in_array($u['id'],$assignd_users)){?>checked="checked"<?php } ?> type="checkbox" class="user-checkbox" name="user_checkbox[]" value="<?= $u['id'] ?>"></td>    
            </tr>

            <?php 
            }
        ?>
    </tbody> 
</table>
