banner image
Sedang Dalam Perbaikan

How to get Correct result from time function in PHP

I m using time() function to get time in PHP but its giving a result something like dis 5228376829243 can someone help me to convert it into proper time format.

time();
Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
http://www.php.net/manual/en/function.time.php

thanks but is there a function which can giv me date lyk dis 2:30:30 (h:m:s)

Use mktime() function.
It gives u proper time as u want

date("h:m:s");

date('Y-m-d H:i:s', time());

How to get Correct result from time function in PHP How to get Correct result from time function in PHP Reviewed by MCH on May 22, 2014 Rating: 5

No comments:

Powered by Blogger.