AMPscript Blocks

AMPscript blocks are used to define code for interpretation but do not display output where the code appears in the email or on the page. There are some exceptions to this rule through the provision of two functions, Output and OutputLine, which enable variable values to be output at the location where the code block appears.

Example 1

In this example, a constant value is set based on the current month when the email is sent, within an AMPscript block. The output value of the heading can then be displayed on the page or in the message using inline AMPscript.

Not a subscriber? Subscribe now.

Example 2

Not a subscriber? Subscribe now.