Advertisement
Guest User

Untitled

a guest
Feb 24th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2. $amount_paid = 65.50;
  3. $totaldays = date('t',strtotime('15-02-2019'));
  4. $amount_paid_per_day = $amount_paid/$totaldays;
  5. $start_date = date('d',strtotime('15-02-2019'));
  6. $today_date = date('d');
  7. $total_refund_day = $totaldays -($today_date - $start_date);
  8. $total_refund_amount = number_format($amount_paid_per_day*$total_refund_day,2,'.','');
  9. echo $totaldays.'--total days in month specified--'.$amount_paid.' ----- '. $total_refund_day .' ---- '.$total_refund_amount;
  10.  
  11. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement