VAR Keyword

Purpose

Replaces a variable within a string with its actual value.

Syntax

<!-- #ICE [REPEAT] VAR=`HTML text with variables` -->


Description

HTML text with variables is any allowable HTML text.  Variables are denoted by preceding the variable name with a colon (:).

This keyword can be used to read the specified variables and replace the variables with their actual textual values within a text string.

REPEAT Option                   The REPEAT option causes a reparse of the resultant string after the variables have been inserted.  This allows variables to contain macros or other variables.  See the FUNCTION keyword for information on the REPEAT option.

Example

In the Plays tutorial application, the HTML containing the VAR macro keyword appears as follows, using the e_orderNumber variable:

<!-- #ICE VAR=`Your order number

   <b>:e_orderNumber</b> will now be processed.<br>

   Please quote this number in all correspondence`

-->

The application sets the e_orderNumber session variable to a character string that becomes part of the message to the customer.

See Also

DECLARE keyword