09 August 2019

How to pass variable id through href in php

<table class="table table-hover">
    <thead>
        <tr>
            <th>Subject</th>
            <th>Add Topic</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <?php foreach($subjects as $sub):?>
            <td><?php echo $sub->subject;?></td>
            <td><a href='approve.php?id=".$sub->id."' role="button" class="btn">Add Topic</a></td>
        </tr>
        <?php endforeach;?>
    </tbody>
</table>

No comments:

Post a Comment

How to create youtube videos slider with play and pause option in wordpress?

Create youtube videos slider with play and pause option in wordpress youtube videos slider Use this shortcode:- [punjab_today] function my_...