how to get date/day difference between current date and added date in php

<?php
                                                    $now = time(); // or your date as well
                                                    $your_date = strtotime('Y-m-d'); // Insert date in this format
                                                    $datediff = $now - $your_date;
                                                   
                                                    echo floor($datediff / (60 * 60 * 24));
                                                ?>

Comments

Popular Posts