Home Tutorial Php Phpbasics Tutorial PHP Date Function with Example

 
 

PHP Date Function with Example
Posted on: November 3, 2009 at 12:00 AM
Advertisement
PHP Date Example: In this tutorial you will get to know about how to write a program in PHP, in addition this page has given important links, which will help you to learn PHP

 Write simple program to display the current date

To develop the first program of PHP, you need to have a web server like: Apache Tomcat , IIS etc. Another way to develop PHP program. WAMP is a kind of stack of software collection, WAMP is the acronym for Windows, Apache, MySQL, and PHP. WAMP server is one of the popular server use for PHP. It is free and you can download it from http://www.wampserver.com/en/download.php (you can copy and paste this link in the browsers address bar). After downloading the .exe file, install this file (normal installation as we do for other software package),

For downloading and installing please visit our web site:http://roseindia.net/tutorial/php/phpbasics/Downloading-Installing-Wamp.html

For starting the WAMP server: http://roseindia.net/tutorial/php/phpbasics/Running-Testing-Wamp.html

Now to develop the first program do as follows:

Exmaple 1:

<?php

    echo date("l");

?>

Output:

Tuesday

In PHP date() is a predefined function which returns a string value, depends on the parameter passed. To know more about date() function please visit our web page: http://www.roseindia.net/tutorial/php/phpdate/index.html

Advertisement

Related Tags for PHP Date Function with Example:


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: November 3, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com