How could I convert a unix timestamp , i.e. from time(), into a m-d-Y string using php?
+3
A:
use date()
string date ( string $format [, int $timestamp ] )
Returns a string formatted according to the given format string using the given integer timestamp or the current time if no timestamp is given. In other words, timestamp is optional and defaults to the value of time().
Soufiane Hassou
2010-05-23 10:19:24
+1
A:
The very first example in the mktime manual entry shows you such a function. No good developer can be made of one who ignores manual lookup.
Col. Shrapnel
2010-05-23 10:48:29
thats for m-d-y to time().
AFK
2010-05-23 10:51:25
@AFK you desperately need to pay more attention. EVERY example on the page doing what you're asking for. Every friggin' one.
Col. Shrapnel
2010-05-23 11:12:59