Share on Google+Share on Google+
time ()
Posted on: August 29, 2009 at 12:00 AM
Advertisement
Here is the example of PHP time function that is used for returning current time.

PHP time() Function

The time() returns the current time  measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). This function is similar to mktime() with no parameters or calling date ("U").

Syntax of time() Function in PHP

time(void)

Parameter of time() Function in PHP

void - void is optional parameter. 

Example of time() Function in PHP:

<?php
$t=time();
echo($t . "<br />");
echo(date("D F d Y",$t));
?>

Output: The output of the code above could be:

1251523244
Fri Aug 29 2009

Advertisement

Related Tags for time ():


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: August 29, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com