aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/docs/programmers/api-functions/api-clear-all-assign.md
blob: cc75fad0f7912b756bad0cd60442b42c10bfbd76 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
clearAllAssign()

clears the values of all assigned variables

Description
===========

void

clearAllAssign


    <?php
    // passing name/value pairs
    $smarty->assign('Name', 'Fred');
    $smarty->assign('Address', $address);

    // will output above
    print_r( $smarty->getTemplateVars() );

    // clear all assigned variables
    $smarty->clearAllAssign();

    // will output nothing
    print_r( $smarty->getTemplateVars() );

    ?>

       

See also [`clearAssign()`](#api.clear.assign),
[`clearConfig()`](#api.clear.config),
[`getTemplateVars()`](#api.get.template.vars), [`assign()`](#api.assign)
and [`append()`](#api.append)