PHP code starts out looking like HTML code and ends up looking nothing like it. If you’ve looked at HTML code, you’ve seen things that look like “<em>” or “<h2>”. You will put your PHP code between “<?” and “?>”. For example, the following web page will display the current time:
<html>
<head>
<title>My PHP Page</title>
</head>
<body>
<h1>PHP Test Page</h1>
<p>The current time is <?echo date('h:i A')?></p>
</body>
</html>
Except for the php part, this looks like a normal web page. The only PHP part is the “<?echo date('h:i A')?>”. If you save this file as “test.php” on your web site, and then view it, you will see the current time every time you reload your page.