Sorry for posting here, but there is not section in this forum for Smarty discussions.
I would like to get a solution for this problem. I declare an associative array in a php file and assign it to a Smarty template
Code:
$products = array(
array("name" => "Adidas", "products" => "12"),
array("name" => "Asics", "products" => "8"),
array("name" => "Montrail", "products" => "4"),
array("name" => "New Balance", "products" => "7"),
array("name" => "Puma", "products" => "9"),
array("name" => "Salomon", "products" => "11"),
array("name" => "Vasque", "products" => "6"),
);
$smarty->assign("manufacturers", $manufacturers);
How can I create a table using Smarty, with a specified number of colums, as the following (let's say columns number is 3):
column 1 column 2 column 3
row 1: Adidas Asics Montrail
row 2: 12 8 4
row 3: New Balance Puma Salomon
row 4: 7 9 11
row 5: Vasque
row 6: 6
I know how to do it with 3 rows grouping in a table cell [name] and [products]. This version with 6 rows seems to be complex for me. I appreciate a solution on this.
Thanks!