Basic PHP Syntax

Php codes will starts with <?php and ends with ?>. Here is the first php program. <html> <body> <?php echo "MY First PHP Program"; ?> </body> </html> Write the above codes in notepad and save it as first.php. Now run the this file on localhost, you should be able to see MY First PHP Program. Here echo is a print command.
October 30th, 2008 by Ranjith 

How to run PHP files on localhost?

1. First download the xampp from http://www.apachefriends.org/en/xampp.html 2. Extract the file and double click the exe. This will install Mysql and Apache servers. 3. Once the installation is complete, you will find XAMPP under Start / Programs / XAMPP. You can use the XAMPP Control Panel to start/stop all servers. Start Mysql and Apache servers. 4. Write a test.php file and copy it in to C:/Program...

October 30th, 2008 by Ranjith