i have datatable rows have button with array value every thing is ok but iframe not updated inside modal it keeps show the first value inside iframe how can update source inside modal
<td>
<button class="btn btn-primary" data-toggle="modal" data-target="#myModal">
<?php echo base_url('dash/course_price/'.$c->c_id);?>
</button>
<!-- Modal -->
<div
class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" >
</button>
</div>
<div class="modal-body">
<iframe
src="<?php echo base_url('dash/course_price/'.$c->c_id);?>"
width="100%" height="380" frameborder="0" allowtransparency="true" ></iframe>
</div>
</div>
</div>
js and css :
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>