PHP Tags

Did you notice in the previous article how I included php code. To use PHP code, one must first open the php tags.

PHP tags can take one of the following forms:

Standard way
 /*your php code*/
Using script tags
<script language="php">
 /*your php code*/
Short tags
 /*your php code*/
ASP style PHP tags
 /*your php code*/

First one (standard way) is the norm and is recommended. You should stick to it.

Second one (using script tags) can also be used but not recommended.

For third and fourth php tags that is short tags and asp style tags, you have to configure your server first by enabling them. After that you can easily use it.

For your knowledge and completeness of the tutorial I have introduced all the php tags form. But make a habit of using the standard form of PHP tag.

<< First drive with PHP Displaying Output >>