write code to find the date difference b/w two given date
using PHP not MYSQL function?

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 ?    9 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is it possible to parse a configuration file?

519


What are form input html tags?

565


What is a persistence cookie?

529


What is composer json?

501


Why print_r is used in php?

547






What is the use of @ in php?

558


Which is the best php framework for a beginner?

534


What is the role of php?

517


Explain the installation of PHP on UNIX systems?

553


What is a variable cost example?

555


What are the file upload settings in configuration file?

544


How long is session timeout?

542


What is the difference between $argv and $argc? Give example?

514


What is use of in_array() function in php?

551


Explain the differences between get and post methods?

504