Monday, 23 April 2007
Easy time_since Function in PHP |
| |
|
| |
The Photogapple.co.uk blog has code that can be useful when working with dates in PHP. The author, Carbon Twelve has given a function to find the difference between the current time and a timestamp provided by you.
He says, it is difficult to find any form of time_since function in PHP. So to save anyone else the trouble of hunting through hundreds of useless web sites he gives this function. Carbon tells you that this function takes the input in the form of the Unix time stamp.
He provides a second compact version. He takes the input in the form of the MySQL timestamp format (Y-m-d H:i:s). However, he shows that both functions output the same type of things, so the decision to choose the respective function is entirely on you. |
| |
|
Read the Post
|
| |
|
|
| |
|
|
| |
|