String Case Conversion - @strtoupper, @strtolower, and @ucfirst
The @strtoupper
, @strtolower
, and @ucfirst
directives in Ahmed PHP Template Engine allow you to modify the case of text dynamically.
Syntax
@strtoupper
converts the giventext
to uppercase.@strtolower
converts the giventext
to lowercase.@ucfirst
capitalizes the first letter of the giventext
.
Example
Output
Notes
Useful for formatting text dynamically in templates.
Works with both variables and static strings.
Can be combined with other directives for more complex string manipulations.
Last updated