PHP - Count number of days between 2 dates

后端 未结 3 704
南笙
南笙 2021-01-25 16:49

I am trying to write a function that can count the number of days between 2 dates. I currently have the below but it is giving me some unexpected results:

functi         


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-01-25 17:12

    please use date_diff function like this

    format("%R%a days");
    ?>
    

    hope this helps you thanx.

提交回复
热议问题