Hello World Program in PHP

Have you just started with PHP or want to start with PHP, then this is the best place to learn. Below is the basic syntax of PHP programming language.

Basic PHP Syntax

Create a file and save it with .php extension in your htdocs(If you have installed XAMPP Server) OR www (If you have installed WAMP Servre) folder.

A PHP programs starts with php tags. See the below example. See the below basis syntax of PHP programming language.

PHP Hello World Program

You cna also execute the PHP code insde the HMTL and CSS code, see the below example:

Output of above program is

Hello World Program in PHP

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.