How to Make a Hello World Program in PHP

In the previous post, i explained about Hello World program in Java. And now, i will explain about how to make a Hello World Program in PHP....

In the previous post, i explained about Hello World program in Java. And now, i will explain about how to make a Hello World Program in PHP. In PHP language, Hello World program can be made by a very simple codes. Just using Print or Echo, we can display Hello World text in the screen.

There are two simple ways to make a Hello World Program in PHP.

First :
<?php
          Print "Hello, World!";
?>
Second :
<?php
          Echo "Hello, World!";
?>

It's very simple, isn't it? If you already make your Hello World Program, then you can save your file in using .php extension (ex : HelloWorld.php). In this case, we don't need to compile the program. Just run it with your web browser to test your program.

Before that, you must download and install XAMPP in windows platform. Place your Hello World file inside folder XAMPP in sub-folder htdocs. And now you will see a "Hello, World!" text in your screen when you open your program using web browser (localhost/HelloWorld.php)


Make sure yout XAMPP is running.
PLEASE LIKE OUR FACEBOOK FANPAGE close button

Related

programming 6838660259587812110

Post a Comment

  1. Untuk mempelajari PHP biasanya berlajar dari situs php.net hanya saya sebagai orang awam belum ada waktu untuk itu

    ReplyDelete

To insert image or video : [img]image-link[/img] or [video]video-link[/video]

emo-but-icon

Recent

Popular

Random

item