Skip to main content

mbr_select

Usage

This shortcode returns a value from a specified list, based upon a switch variable, similar to a programming switch construct.

Note

If a number n (integer) is used as the switch variable, the n-th ordinal value will be returned, if there is one.

If a string (alphanumeric) is used as the switch variable, the ordinal number of the matching value is returned e.g. if the third item matches, a 3 is returned.

Parameters

ParametersDescription
caseA list of values, separated by | (pipe). The first item in the list is the switch variable to be compared against the remaining values.
Default: none.
Required: yes.

Validity

This shortcode is evaluated for any type of visitor.

Conditional Branching

This shortcode does NOT support conditional branching with [ELSE_select].

Nesting

Shortcode nesting within is NOT supported.

Examples

Returns no.

[mbr_select case='2|yes|no|maybe']

API

Note

There is no ActiveMember360 API function equivalent for this shortcode. Please use the PHP function switch.