Hi,
ik heb me net verdiept in smarty, en nu heb ik in smarty de functie extract nodig.
deze heb ik gevonden op smarty.incutio.com.
functie ziet er alsvolgt uit:
ik heb dit opgelagen als function.extract.php in de plugins map.
alleen, hoe roep ik nu deze functie op? ik heb bij de functie ook geen documentatie kunnen vinden
Thx
ps. het klopt toch dat je geen arrays kan gebruiken in smarty?
ik heb me net verdiept in smarty, en nu heb ik in smarty de functie extract nodig.
deze heb ik gevonden op smarty.incutio.com.
functie ziet er alsvolgt uit:
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| <? /* * Smarty plugin * ------------------------------------------------------------- * Type: function * Name: extract * Purpose: extracts an array into template variables just * like the standard PHP extract() function * ------------------------------------------------------------- */ function smarty_function_extract($params, &$smarty) { if (empty($params["value"])) { $smarty->trigger_error("extract: missing 'value' parameter"); return; } $smarty->assign($params["value"]); } ?> |
ik heb dit opgelagen als function.extract.php in de plugins map.
alleen, hoe roep ik nu deze functie op? ik heb bij de functie ook geen documentatie kunnen vinden
Thx
ps. het klopt toch dat je geen arrays kan gebruiken in smarty?
[ Voor 12% gewijzigd door Mark Wegener op 16-01-2003 19:11 ]