- Text Editor: Notepad++ (Recommended)
- Browser: Chrome, Mozilla, or Internet Explorer
Write a program that will print “Hello World” in php (without the qoutes).
1. Open up Notepad++
2. Enter the source code below and save as “helloworld.php” inside your root directory, example, C:/xampp/htdocs/php-beginners.com/ex1/helloworld.php
<?php echo "Hello World"; ?>
3. Open up your browser and visit this address – http://localhost/php-beginners.com/ex1/helloworld.php or simply click the link.
4. It should display “Hello World” (without the qoutes) in your browser.
Congratulations! You have successfully run a simple php program. We will have more of these in our future discussions.