2023-02-06 14:42:31 +01:00
|
|
|
# lower
|
2021-12-03 11:59:22 +01:00
|
|
|
|
|
|
|
|
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.
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
## Basic usage
|
|
|
|
|
```smarty
|
|
|
|
|
{$myVar|lower}
|
|
|
|
|
```
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
## Examples
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
```php
|
|
|
|
|
<?php
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
$smarty->assign('articleTitle', 'Two Convicts Evade Noose, Jury Hung.');
|
|
|
|
|
```
|
2021-12-03 11:59:22 +01:00
|
|
|
|
|
|
|
|
Where template is:
|
|
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
```smarty
|
|
|
|
|
{$articleTitle}
|
|
|
|
|
{$articleTitle|lower}
|
|
|
|
|
```
|
2021-12-03 11:59:22 +01:00
|
|
|
|
|
|
|
|
This will output:
|
|
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
```
|
|
|
|
|
Two Convicts Evade Noose, Jury Hung.
|
|
|
|
|
two convicts evade noose, jury hung.
|
|
|
|
|
```
|
2021-12-03 11:59:22 +01:00
|
|
|
|
2023-02-06 14:42:31 +01:00
|
|
|
See also [`upper`](language-modifier-upper.md) and
|
|
|
|
|
[`capitalize`](language-modifier-capitalize.md).
|