Home >Backend Development >PHP Tutorial >Example analysis of smart variable modification usage in php_PHP tutorial
test.php code:
3 4
5
8
9 |
$total = 12345; //Assign value to $total
|
1 2 3 4 5 6 7 8 9 |
Total is {$total}Formatted Total is {$formatted_total} |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<🎜>compiled from test1.htm */ ?>
Total is _tpl_vars['total']; ?>Formatted Total is _tpl_vars['formatted_total']; ?> |
1 2 3 4 5 6 7 8 9 |
Total is {$total}Formatted Total is {$total|number_format} |
Then the corresponding test.php code is changed to:
3 4 6 7
|
?> |