How can we know the number of days between two given dates
using PHP?
Answer Posted / rameshfromind
There is one function for gregoriantojd that means convert
to gregorian calendar date to julian date count.
Below the example for counting days between two date.
<?
$startDate = '01-01-2008' // mm-dd-yyyy/yy
$endDate = '01-30-2008' // mm-dd-yyyy/yy
echo gregoriantojd($endDate) - $gregoriantojd($startDate);
?
// OUTPUT
29
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
How to get the total number of values in an array?
What is mean by an associative array?
Is php open source?
What is overloading and overriding in oop?
Is php 7 backwards compatible?
What is the ioncube php loader?
What is the difference between client-side and server-side programming?
What is encapsulation in php with example?
What are the Formatting and Printing Strings available in PHP?
What is binary safe function in php?
How to access a specific character in a string using php?
What is php built on?
What is the difference server side and browser side validation?
What is php routing?
What is active record in php?