<?php $i=1;foreach($playlist as $r){?>
<tr><td><?php echo $i;?></td><td><?php echo $r->aud_title;?></td><td>
<a href="#" id="<?php echo $r->al_song_id;?>" class="btn btn-danger remove_song"><i class="fa fa-trash-o"></i></a>
</td></tr>
<?php $i++;}?>
<script>
$(document).ready(function(){
	$(".remove_song").click(function(e){e.preventDefault();
		var id=$(this).attr("id");
		$(this).closest("tr").remove();
		$.ajax({
							 type: "POST",
							 url: '<?php echo base_url();?>admin/remove_album_playlist',
							 data: {id:id},
							 success: function(response){
								// alert(response);
								 //$("#playlist").html(response);
							 }
							 });
	});
});
</script>
            