|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
PHP-General - Work out how many days
Say i have the date "2008-05-06" and i want to find how many days ago that was in php, what is the easiest way?
|
|
#2
|
||||
|
||||
|
That looks like something from MySQL...
Is it? Because then you can use the DATEDIFF function: Code:
SELECT DATEDIFF(NOW(), date) AS `days` If not, try PHP Code:
__________________
How to ask a question |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > PHP-General - Work out how many days |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|