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
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.