Your Ad Here
0

How can we know the number of days between two given dates using PHP?

Posted by The Blogger on 11:55 AM in
Answer:
$date1 = date(’Y-m-d’);
$date2 = ‘2006-07-01′;
$days = (strtotime() – strtotime()) / (60 * 60 * 24);
echo “Number of days since ‘2006-07-01′: $days”;

tags: php interview questions and answers, php interview question How can we know the number of days between two given dates using php, How can we know the number of days between two given dates using php

0 Comments

Post a Comment

Your Ad Here

Copyright © 2009 Interview Questions and Answers