I have this function I wrote, but it seems to always get thrown into an infinite loop. the problem is I'm trying to convert a integer (i.e. 135533234) into a human readable time stamp. (ie. 4:23:31:10). The integer is in seconds. This is what I have so far, can someone help me with possibly an easier way to do this, or help me fix this one?
David Clain, by looking at the problem explanation and return value it's concludable that Atomic Haven wants to display number of days, hours etc. for a given timestamp so issuing time() function is pointless.
Atomic Haven, you didn't clearly specify what exactly do you want to do and where do you get that integer from. Is it a Unix timestamp or just plain represnentation of an amount of time within one month (or whatever)?
Anway, if I had to count number of days from an integer, i'd probably divide numbers ( round($totaltime / (3600*24)) ) and so on for every possible time representation (hour, minute, second).
basically I have two time stamps. One is larger than the other, I get a Number when I subtract the smaller one from the larger one. I then want to take that number (which is in seconds) and see how many days, hours, minutes and seconds there are.