How to use localtime in PHP

This article describe about localtime() Function in PHP.
  • 1962

localtime() Function

This function return an array that contains the time of Unix timestamp.

Syntax

localtime(timestamp, is_associative)

 

Example

 

<html>
<body>
<?php
print_r(localtime());
echo("<br /><br />");
print_r(localtime(time(),true));
?>
</body>
</html>

 

Output

pic7.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.