Helpers:array
From Dwoo Docs
(Redirected from Array)
Creates a PHP array with the given input
array(array $rest)
- rest : any number of values of variables, either with named parameters to build an associative array or without for an auto-indexed array
Associative Array Example:
{assign array(name="Bob" gender="male") user}
{$user.name} is {$user.gender}
Output:
Bob is male
Auto-indexed Array Examples:
{assign array("Bob" "John") users}
First user is : {$users.0}
User list : {foreach $users user}{$user} {/foreach}
Output:
First user is : Bob User list : Bob John




