Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $amount_paid = 65.50;
- $totaldays = date('t',strtotime('15-02-2019'));
- $amount_paid_per_day = $amount_paid/$totaldays;
- $start_date = date('d',strtotime('15-02-2019'));
- $today_date = date('d');
- $total_refund_day = $totaldays -($today_date - $start_date);
- $total_refund_amount = number_format($amount_paid_per_day*$total_refund_day,2,'.','');
- echo $totaldays.'--total days in month specified--'.$amount_paid.' ----- '. $total_refund_day .' ---- '.$total_refund_amount;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement