PHP Classes

File: htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-functions/api-get-template-vars.md

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-functions/api-get-template-vars.md   Download  
File: htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-functions/api-get-template-vars.md
Role: Example script
Content type: text/markdown
Description: Example script
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 3 months ago
Size: 700 bytes
 

Contents

Class file image Download

getTemplateVars()

returns assigned variable value(s)

Description

array

getTemplateVars

string

varname

If no parameter is given, an array of all assigned variables are returned.

<?php
// get assigned template var 'foo'
$myVar = $smarty->getTemplateVars('foo');

// get all assigned template vars
$all_tpl_vars = $smarty->getTemplateVars();

// take a look at them
print_r($all_tpl_vars);
?>

   

See also assign(), {assign}, append(), clearAssign(), clearAllAssign() and getConfigVars()