Below is an example of one of the easiest PHP and HTML page that you can create and still follow web standards.
Output:
HTML and PHP program Hello World!
If you save this file and place it on PHP enabled server and load it up in your web browser, then you should see "Hello World!" displayed. If not, please check that you followed our example correctly.
We used the PHP function echo to write "Hello World!" and we will be talking in greater depth about this PHP function and many others later on in this tutorial.
PHP and HTML Code:
<html>
<head>
<title>PHP and HTML program</title>
</head>
<body>
<?php
echo "HTML and PHP program Hello World!";
?>
</body>
</html>
<head>
<title>PHP and HTML program</title>
</head>
<body>
<?php
echo "HTML and PHP program Hello World!";
?>
</body>
</html>
Output:
HTML and PHP program Hello World!
If you save this file and place it on PHP enabled server and load it up in your web browser, then you should see "Hello World!" displayed. If not, please check that you followed our example correctly.
We used the PHP function echo to write "Hello World!" and we will be talking in greater depth about this PHP function and many others later on in this tutorial.
👌👌👌👌
ReplyDelete