Hello World in PHP

By Joe the PHP Don
★ April 14, 2016 ★
Hello World Code in PHP.

This is my first post on this newly born blog. I have been planning for this blog for long and finally my dream has come true today. Lets start with the traditional hello world code.

Create a text file and name it helloworld.php. Then put this file in your web server's application directory. If you are using Apache, by default 'htdocs' is the root directory and you should place this file in it. Put the following content in the helloworld.php file.

	<title>PHP Hello World</title>
	<?php echo '<p>Hello World</p>'; ?> 

This echo statement in PHP prints the text that follows within the quote. When you run this file, you should see "Hello World" in your browser.

Next ››