Hello World Example in PHP
In this section, you will learn how to develop hello world example in PHP. You need a file like: hello-world.php under the web server's root directory.
Go -> wamp -> www -> create a new directory like: phpExamples (This is the directory name that contains list of php files)
See the following example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 <br />
Strict//EN" "http://www.w3.org/TR/xhtml1/DTD<br />
/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Hello World</title>
</head>
<body>
<?php echo "Hello World"; ?>
</body>
</html>
|
After running this code then you will get the following source code of following output.

Output:

Download Example