How to Write a Hello World Program in PHP
Before going into "Hello World" programme of PHP, Download & Install XAMPP in windows platform., After installation you can see a 'htdocs' folder(xampp\htdocs) in XAMPP installed folder., PHP coding starts with ., Save it.
Step-by-Step Guide
-
Step 1: Before going into "Hello World" programme of PHP
All PHP files should be inside of 'htdocs' folder. , A PHP file is combination of html tags and PHP code.
Write the codes such as <?php echo "Hello World"; ?> Each code line in PHP ends with a semicolon(;).
Echo and print are basically used for displaying information in browser. , The PHP file must be saved with the .php extension. -
Step 2: Download & Install XAMPP in windows platform.
-
Step 3: After installation you can see a 'htdocs' folder(xampp\htdocs) in XAMPP installed folder.
-
Step 4: PHP coding starts with <?php and ends with ?>.
-
Step 5: Save it.
Detailed Guide
All PHP files should be inside of 'htdocs' folder. , A PHP file is combination of html tags and PHP code.
Write the codes such as <?php echo "Hello World"; ?> Each code line in PHP ends with a semicolon(;).
Echo and print are basically used for displaying information in browser. , The PHP file must be saved with the .php extension.
About the Author
Christopher West
Enthusiastic about teaching creative arts techniques through clear, step-by-step guides.
Rate This Guide
How helpful was this guide? Click to rate: