June 12, 2002, 10:01:53 pm
<--PreviousNext -->

Basic Syntax

From HTML to PHP
  • PHP ignores everything not inside the <?php     ?> tags.
  • You can rename all of your .html file to .php files and nothing will change.
Syntax
Statements terminated by either a semicolon or the closing tag.

<?php
	echo "This is a test";
?> 

<?php echo "This is a test" ?> 
			
Comments
<?php 
	// This is a one-line c++ style comment

	/* This is
		a multi line comment */
?>