Possible Duplicate:
PHP: producing relative date/time from timestamps
i search so much on internet but i didn't find how can i create time counter by using php.Exactly i want to this if i post article so i want to show users how much time before this article is posted on website .
firstly it show time in SECONDS, example : 50 sec ago.
secondly after 60 seconds it shows time in MINUTES, example : 1 min ago.
thirdly after 1 hour it will show time in HOURS, example : 2 hours ago.
fourthly after 24 hour it will show time in DAYS, example : 4 days ago.
i also find this thing by jquery but i want to do this in php with Ajax. if i find how can i do this with php after that easily i can implement this with Ajax.