I want to calculate the time from two dates, which date value get from the database. I have retrieved the data from the database apply this code:
foreach ($selectData as $data) { echo $data["check_in"]; echo $data["check_out"]; }
My date formate: Y-m-d H:m:s
But not calculate the total munites from tow date. How can I calculate the time between two dates using PHP?
Question and answer is powered by AnsPress.io