www.pickatutorial.com Computer Tutorials

The <?php ?> Tag. Free online PHP and MySQL Web Database Programming Tutorial...

Top Tutorials: C/C++ | C#.NET | PHP MySQL | Java | Java Script | jQuery | HTML | xHTML | HTML5 | VB Script
Lessons The <?php ?> Tag Bookmark and Share
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Lesson 13
Lesson 14
Lesson 15
Lesson 16
Lesson 17
Lesson 18
Lesson 19
Lesson 20
Lesson 21
Lesson 22
Lesson 23
Lesson 24
Lesson 25
Lesson 26
Lesson 27
Lesson 28
Lesson 29
Lesson 30
Lesson 31
Lesson 32
Lesson 33
Lesson 34
Lesson 35
Lesson 36
Lesson 37
Lesson 38
Lesson 39
Lesson 40
Lesson 41
Lesson 42
Lesson 43
Lesson 44
In the previous lesson, we learned that PHP scripts are always enclosed in between two PHP tags and we learned to use the basic <?php ?> tag. PHP provides us three different forms of php scripting tags, as explained below:

1. <?php
echo "First style";
?>

2. <script language="php">
echo "Second Sytle";
</script>

3. <?
echo "Third Style";
?>

In this tutorial we will prefer the usage of the first style i.e. <? php ?>.

Comments in PHP
Just like other programming languages and HTML, PHP too supports comments in code. It may be noted that PHP supports C++ style of comments. Two types of comments are available in PHP:

1. Single Line Comments
Single line comments can be added as under:
<html>
   <body>
      <?php
         // This is an example of single line comments
     ?>
   </body>
</html>
2. Multi-Line Comments
Multi-line comments can be added as under:
<html>
   <body>
      <?php
         /* This is an example 
         of multi-line comments.
         */	
     ?>
   </body>
</html>



Home - Advertise - Contact - Disclaimer - About Us
© Since 2006 pickatutorial.com -- All Rights Reserved.