Raxix Technologies Blog

Get the latest technological updates about website design & development, Search Engine and Mobile Application Market etc.

Write a Hello World Program in PHP

PHP is a server side scripting language which is used for to create dynamic web pages. For this, First we embedded PHP code into the HTML source document and interpreted by a web server with the PHP processor module, which helps to produce the web page document. There are many PHP frameworks available which are used for web development. CackePHP, Zend, Codeigniter, Smarty is some of the best examples of PHP Framework.

So this is a brief description about PHP programming. Here we are going to discuss about the How to write a Hello World program in PHP.

  • Before writing Hello World program in PHP you have to download and install XAMPP in windows.

How to Write a Hello World Program in PHP

  • After the installation of XAMPP you seen a “htdocs” folder in XAMPP installed folder in c drive folders.

How to Write a Hello World Program in PHP

  • Note: Your all PHP files should be inside of “htdocs” folder.

PHP Code:

  • PHP file is a combination of two things: html tags + PHP Code

<?php

.echo”Hello World!”;

?>

How to Write a Hello World Program in PHP

  • After writing the code you must save your file with .php extension.

How to Write a Hello World Program in PHP

  • And your Hello World program is ready.

Tips:

  1. Your all coding lines of PHP must end with semicolon(;)
  2. Echo and print are used for displaying information in browser.


One thought on “Write a Hello World Program in PHP

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories

Recent Posts