====== getTextElement() ======

''string **getTextElement**(string //textID//)''

Returns the HTML code for the text element with the ID //textID// as a string.

  * //textID//\\ ID of the text element whose content is to be returned.

**Note:** If the text element is output in the questionnaire  with a title and/or formatting, this is also included in the HTML code. However, the potential alignment (left/centred/right/justified) and the spacing below the text element are not included. 

===== Example 1 =====

In the following example, one of 2 text elements ("desc1" or "desc2") is integrated into a third placeholder ("description") via placeholder. The third text element therefore must contain the placeholder ''%desc%''.

<code php>
if (value('AB01_01') == 1) {
  $desc = getTextElement('desc1');
} else {
  $desc = getTextElement('desc2');
}
replace('%desc%', $desc);
text('description');
</code>

===== Example 2 =====

In the following example, each "a" and "A" is replaced with an underscore and the text element subsequently displayed.

<code php>
$content = getTextElement('priming');
$out = str_replace(array('a','A'), '_', $content);
html($out);
</code>