If you have to create a date object of future or past, you can do it by using the second parameter of PHP date function. This is extremely useful when doing BETWEEN comparison in MySQL. You can build the date and bind it to query.

{ 1 comment }

We can find out the difference between two given dates in PHP very easily. Consider the following PHP script:


This script will tell you current date and time with current season or weather.


Date and time in PHP is very useful and handy because it provides you the result of time and date, in the way you want. Using Date and Time functions in flash we can display date and time at website in a number of ways and formats. Below are some examples and best practices.