getTemplateVars
Returns an array of TV records. This function will also return built-in or default TVs (aka. Document variables) such as id, pagetitle, introtext, content, etc. Built-in variables will always be sorted by name and will be returned as the last entries inside the array. This is done so you can override built-in variables with user defined variables.
Usage:
array getTemplateVars($idname="1", $fields="*", $docid="0", $published="1", $sort="rank", $dir="ASC");
(show formatting legend)