« Back to the index
\core\WATemplate loops example
Only the variables:
!!list!!
The variables and the values:
!!dump!!
EOF;
$temp = new \core\WATemplate($template);
$data = array(
'{title}' => 'Hotels projects:',
'data' => array(
array('{id}' => 1, '{name}' => 'Paris', '{status}' => 1, '{statusname}' => 'In project'),
array('{id}' => 2, '{name}' => 'London', '{status}' => 1, '{statusname}' => 'In project'),
array('{id}' => 3, '{name}' => 'Madrid', '{status}' => 2, '{statusname}' => 'In construction'),
array('{id}' => 4, '{name}' => 'New York', '{status}' => 3, '{statusname}' => 'Finished'),
array('{id}' => 5, '{name}' => 'Los Angeles', '{status}' => 1, '{statusname}' => 'In project'),
array('{id}' => 6, '{name}' => 'Mexico City', '{status}' => 1, '{statusname}' => 'In project'),
array('{id}' => 7, '{name}' => 'Moscu', '{status}' => 1, '{statusname}' => 'In project'),
array('{id}' => 8, '{name}' => 'Roma', '{status}' => 1, '{statusname}' => 'In project'),
array('{id}' => 9, '{name}' => 'Berlin', '{status}' => 3, '{statusname}' => 'Finished'),
)
);
$temp->metaElements($data, false, false);
print $temp->resolve();
?>
« Back to the index