The "look and feel" of PHP

As stated before, PHP code goes right in your html document, and is executed by the web server module. Here's an example:
		<HTML>
			<HEAD><TITLE>What time is it?</TITLE></HEAD>
			<BODY>

			The time is now 
			<?php 
				print(date("d/m/Y H:i:s",time())); 
			?>
			</BODY>
		</HTML>
When this page viewed, the body would look something like:
		The time is now 10/02/2001 20:06:07
If you simply want to print out the contents of a value, and your php.ini file is configured for it, you can use:
		The time is now <?=date("d/m/Y H:i:s",time())?>
The <?php and ?> tags do not have to be on the same line.

One hard concept to grasp is that the <?php ?> tags are merely to delimit what is PHP code and what is HTML. The whole page is processed by the PHP module. So different parts of the same program can be in different <?php ?> tags, and even have HTML between them. So you can do things lile

		Authorizing... You are 
		<?php if(Authorized($UserName)) {  ?>
		authorized.  Please proceed.
		<?php }  else { ?>
		<FONT COLOR="RED" SIZE="+2"> NOT AUTHORIZED! A security team has been dispatched.  Please remain where you are.
		<?php } ?>
This also means variables with global scope (declared outside of functions) have page scope, and can be referenced from different blocks of PHP code on that page.

Why PHP is like C/C++

Why PHP is like Perl

Why PHP is unique