Sunday, 9 June 2013

How to get current server date in php?



Example -

 In below example, we have used the date function in php to find the current date on server.

Code and Syntax

<?php
// Print the current day…
echo date("l") . "<br>";

echo date(“dd-mm-y”);
?>


Explanation
We have used date function to print today’s date.

For more php questions and answers, dumps, tutorials for beginners and experienced people visit http://www.top-php-interview-questions.blogspot.in  If you find any errors while executing this program, you can make your comments or mail me at reply2sagar@gmail.com







No comments:

Post a Comment