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:
append (anhängen)
void append(mixed var);
void append(string varname,
mixed var,
bool merge);
Wird verwendet, um an Template-Variablen weitere Daten anzuhängen. Sie können entweder ein Namen/Wert-Paar oder assoziative Arrays, die mehrere Namen/Wert-Paare enthalten, übergeben.
Example 13.1. append (anhängen)
<?php // Namen/Wert-Paare übergeben $smarty->append("Name", "Fred"); $smarty->append("Address", $address); // assoziatives Array übergeben $smarty->append(array("city" => "Lincoln", "state" => "Nebraska")); ?>