Php "Hello World!"
In this tutorial you will see the “Hello World!” code script for php.
Let’s asume that you already know how to start using local php server.
Open your file that will be used to do this job.
First you need to open the php tag ,you can use html tags before this script, or not.
It is your choise, the browser will automaticly generate these html tags.
After opening php tags use “echo” to output the “Hello World!” string. Between php tags you can generate more html code in order to display an unknown number of items.
But for now let’s stick to the problem and use echo to display a string.
You can use the code bellow.
<?php echo "Hello World!"; ?>
note: the extension of the file used to display this string must be php, otherwise you will see the file content as is.