PHP Syntax Tutorial

This chapter will teach you about basic of PHP syntax.

Most commonly used PHP canonical tags

<?php ..... ?>

There are also some other PHP open tags

<? .... ?>

<script language="php"> ......... </script>

What is PHP Syntax? <?php ... ?> is commonly used PHP Syntax.
There are also some other PHP open tags <? .... ?> or <script language="php"> ......... </script>

PHP codes can be anywhere in the document within PHP open and close tags


//  PHP code should be within open and close tags of PHP


Default file extension of PHP file is .php

What is default file extension of PHP?
.php is the default file extention of PHP

PHP file can contain HTML tags, text, CSS, PHP script and JavaScript see example.

<title>Hello John</title>
CSS code should be here
<?php echo "Hello, John!";?>
JavaScript code should be here
Find us on

Facebook Google Plus Twitter Pinterest YouTube

web hit counter