<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
                      "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>PHP Short Open Tag - DEMO - Perishable Press</title>
    <meta http-equiv="content-type"
          content="text/html;charset=utf-8">
    <style type="text/css">
      h1
      {
        background-color:              #666;
        padding:                       2px 5px;
      }
      h2
      {
        background-color:              #999;
        padding:                       2px 5px;
      }
      h3
      {
        background-color:              #ccc;
        padding:                       2px 5px;
      }
      h6
      {
        background-color:              #ffffe1;
        border:                        1px solid #ccc;
        color:                         #666;
        padding:                       2px 5px;
        text-align:                    center;
      }
    </style>
    <script src="http://perishablepress.com/mint/?js" type="text/javascript"></script>
  </head>
  <body>
<?php $sot = !ini_get("short_open_tag") ? 'disabled' 'enabled'// http://perishablepress.com/php-short-open-tag/ ?>
    <h1>Short Open Tag</h1>
    <p>short_open_tag: <strong><?php echo $sot;?></strong>.</p>
    <h2>Define variables (using short_open_tag)</h2>
<?
  $username 
"username";
  
$password "password";
  
$message1 "    <p>Primary message.</p>";
  
$message2 "    <p>Secondary message.</p>";
  
$message3 "    <p>Tertiary message.</p>";
?>
    <h3>Print variables (using short_open_tag echo shortcut)</h2>
<?=$message1,"\n"?>
<?=$message2
,"\n"?>
<?=$message3
,"\n"?>
    <h2>Define variables (NOT using short_open_tag)</h2>
<?php
  $username 
"username";
  
$password "password";
  
$message1 "    <p>Primary message.</p>";
  
$message2 "    <p>Secondary message.</p>";
  
$message3 "    <p>Tertiary message.</p>";
?>
    <h3>Print variables (using short_open_tag echo shortcut)</h2>
<?=$message1,"\n"?>
<?=$message2
,"\n"?>
<?=$message3
,"\n"?>
    <h2>Define variables (NOT using short_open_tag)</h2>
<?php
  $username 
"username";
  
$password "password";
  
$message1 "    <p>Primary message.</p>";
  
$message2 "    <p>Secondary message.</p>";
  
$message3 "    <p>Tertiary message.</p>";
?>
    <h3>Print variables (NOT using short_open_tag echo shortcut)</h2>
<?php
  
echo $message1,
       
"\n",
       
$message2,
       
"\n",
       
$message3,
       
"\n";
?>
<?php 
echo '    <h6><a href="view-source:http://',
           
$_SERVER['SERVER_NAME'],
           
$_SERVER['SCRIPT_NAME'],
           
'">Using Firefox? Click here to view the html source.</a></h6>',
           
"\n";?>
<?php 
echo '    <h6><a href="http://',
           
$_SERVER['SERVER_NAME'],
           
$_SERVER['SCRIPT_NAME'],
           
's">Click here to view the php source.</a></h6>',
           
"\n";?>
<?php 
echo '    <h6><a href="http://perishablepress.com/php-short-open-tag/">Learn more about this demo</a></h6>',
           
"\n";?>
  </body>
</html>