Files
smarty/docs/designers/language-modifiers/language-modifier-upper.md

34 lines
606 B
Markdown
Raw Permalink Normal View History

2023-02-06 14:42:31 +01:00
# upper
This is used to uppercase a variable. This is equivalent to the PHP
2023-02-03 22:31:59 +01:00
[`strtoupper()`](https://www.php.net/strtoupper) function.
2023-02-06 14:42:31 +01:00
## Basic usage
```smarty
{$myVar|upper}
```
2023-02-06 14:42:31 +01:00
## Examples
2023-02-06 14:42:31 +01:00
```php
<?php
$smarty->assign('articleTitle', "If Strike isn't Settled Quickly it may Last a While.");
```
Where template is:
2023-02-06 14:42:31 +01:00
```smarty
{$articleTitle}
{$articleTitle|upper}
```
Will output:
2023-02-06 14:42:31 +01:00
```
If Strike isn't Settled Quickly it may Last a While.
IF STRIKE ISN'T SETTLED QUICKLY IT MAY LAST A WHILE.
```
See also [`lower`](./language-modifier-lower.md) and
2023-02-06 14:42:31 +01:00
[`capitalize`](language-modifier-capitalize.md).