Mix multiple code blocks in html in PHP

Description

The following code shows how to mix multiple code blocks in html.

Example


<html>// w w  w  .  j  a v a  2  s.c o m
   <head>
      <title><?php echo "Welcome to my We site!";?></title>
   </head>
   <body>
      <?php
         $date = "July 26, 2010";
      ?>
      <p>Today's date is <?=$date;?></p>
   </body>
</html>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Language Basic »




PHP Introduction
PHP Operators
PHP Statements
Variable
PHP Function Create
Exception
PHP Class Definition