View / Download this file.
------------
DISPLAY TAGS
------------
----------
TAG FORMAT
----------
Where "Perl" represents your Perl code:
<?DISPLAY Perl DISPLAY?>
<?display Perl display?>
<?display Perl ?>
<?= Perl =?>
<?= Perl ?>
<?=
Perl
?>
-----------
DESCRIPTION
-----------
The DISPLAY tag is simply a port of Perl's "print" statement. Any content
inside a DISPLAY tag is placed inside a Perl "print" statement behind the
scenes and should be treated as such. No unquoted semicolons (;) should
be placed inside a DISPLAY tag, as it would prematurely end the "print"
statement. The intent of the DISPLAY tag is to allow the developer to
display their PTM values quickly in mid-HTML thought.
--------------
USAGE EXAMPLES
--------------
------------------------------------------------
Example 1: Displaying a Simple [Scalar] Variable
------------------------------------------------
<?= $x ?>
-----------------------------------------------------------------------
Example 2: Displaying Two (2) Comma-Seperated Simple [Scalar] Variables
-----------------------------------------------------------------------
<?= "$x, $y" ?>
----------------------------------------------------------------
Example 3: Displaying a Comma-Seperated List [Array] with "join"
----------------------------------------------------------------
<?= join(', ', @z) ?>
----------------------------------------------------------------------
Example 4: Printing Number: 1-10 with the DO tag, a For Loop, and HTML
----------------------------------------------------------------------
<? for ($i = 1; $i <= 10; $i++) { ?>
<b>Number: </b><?= $i ?><br>
<? } ?>
|