PHP Seconds to Days, Hours, Minutes, Seconds

Hi there guys, today I’m going to give you a little snippet that I found on the web which I find very useful and I thought I should share it with you.This function will require 1 parameter, the number of the seconds you want to transform into Days, Hours, Minutes, Seconds.

e.g: 600000 = 6 days, 22 hours, 40 minutes, 0 seconds

Hope you find it useful, I sure did !

 

Grohs Fabian

I'm a 21 year old developer from Romania who is always on the grind. Find me on my Instagram @ Motivational.Coder and on Twitter @ grohsfabian

 

Leave a Reply

Your email address will not be published. Required fields are marked *