get a time

Use time(). It will return a Unix timestamp. I.e. 311605418. It is good to pass around time in this format; However, there are PHP functions which can take this output and format it for you.

microtime() also gives you the time. It will give you a string consisting of the fraction of a second, a space and the Unix timestamp. I.e. 0.251221100 441002755.


About samehramzylabib

See About on
This entry was posted in Coding, PHP Time Functions and tagged , , . Bookmark the permalink.


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s