What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
Parameter Position | Typ | Erfoderlich | Standardwert | Beschreibung |
---|---|---|---|---|
1 | string | Ja | n/a | Das zu verwendende Format (sprintf). |
Wird verwendet um eine Zeichenkette, wie zum Beispiel dezimale Werte, zu formatieren. Folgt der Formatierungs-Syntax von sprintf.
Example 5.18. string_format (Zeichenkette formatieren)
{$wert} {$wert|string_format:"%.2f"} {$wert|string_format:"%d"} AUSGABE: 23.5787446 23.58 24