How to Convert timestamp to time ago in PHP ?

29 Views
Reply
L
Legacy User 1
2/1/2022, 10:49:36 AM

How to Convert timestamp to time ago in PHP ?

2 Replies

L
Legacy User 1
2/1/2022, 10:57:30 AM

Change Asia/kolkata to the timezone of time you are passing as parameter ($time).

Output:

2 hours ago
2 hours, 9 minutes, 44 seconds ago

L
Legacy User 0
6/26/2026, 8:18:26 PM

🥇

Leave a Reply

All replies are subject to pre-moderation. Your reply will appear publicly once approved.

S
SPYTM

Experience the pinnacle of digital communication. The ultimate ultra-premium platform designed for those who demand excellence.

© 2026 SPYTM. All rights reserved.