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

35 lines
569 B
Markdown
Raw Normal View History

2023-02-06 14:42:31 +01:00
# lower
This is used to lowercase a variable. This is equivalent to the PHP
2023-02-03 22:31:59 +01:00
[`strtolower()`](https://www.php.net/strtolower) function.
2023-02-06 14:42:31 +01:00
## Basic usage
```smarty
{$myVar|lower}
```
2023-02-06 14:42:31 +01:00
## Examples
2023-02-06 14:42:31 +01:00
```php
<?php
2023-02-06 14:42:31 +01:00
$smarty->assign('articleTitle', 'Two Convicts Evade Noose, Jury Hung.');
```
Where template is:
2023-02-06 14:42:31 +01:00
```smarty
{$articleTitle}
{$articleTitle|lower}
```
This will output:
2023-02-06 14:42:31 +01:00
```
Two Convicts Evade Noose, Jury Hung.
two convicts evade noose, jury hung.
```
2023-02-06 14:42:31 +01:00
See also [`upper`](language-modifier-upper.md) and
[`capitalize`](language-modifier-capitalize.md).