A super basic introduction to PHP.
This tutorial will review the purpose of using a server-side language such as PHP and walk through the process of creating and testing your first PHP file. Here is how you use PHP to display a "Hello World" message:
<?php
echo '<p>Hello World!</p>';
?>- Open up a new file and name it intro.php.
- Fill the intro.php file with the standard HTML tags (
doctype,html,head,body, andtitle). - In the
bodyadd a heading using an HTMLh1tag. - After the heading add an open and close PHP tag (
<?phpand?>). - Within the PHP tags use
echoto display the message "Hello World". - Upload the PHP file to your server (or use your localhost) and test using a browser and your domain name.
Full tutorial URL:
https://codeadam.ca/learning/php-introduction.html