
<ul class="attexp">
<?php $i=1;
	foreach($this->tripslist as $data) { ?>
        <li>
            	<span><?php echo $data['trip_name'];?></span>
                <button type="submit" value="Add" onClick="addTriptoExpense('<?php echo $this->expense_id;?>','<?php echo $data['id'];?>');" id="filled-in-box-<?php echo $i;?>"><i class="fa fa-plus"></i> Add to Expense</button>
            </li>
	<?php 
	$i++;
} ?>
</ul>

<script type="text/javascript">

    var  offsetval= '<?php echo  $this->offset?>';
	$("#offset").val(offsetval);
	var global_record_cnt = '<?php echo $this->totalTripcount;?>';
	
    if(parseInt(offsetval)>=parseInt(global_record_cnt))
    {
		$("#viewmoretrip").remove();
    }


</script> 