I'm using smarty for this
I have in my tpl file
<table width="100%" border="0">
<tr class="header">
<td width="119" class="header"><span class="style1">Deck Name </span></td>
<td width="45" class="header"><span class="style1">Cards</span></td>
<td width="43" class="header"><span class="style1">Worth</span></td>
<td width="68" class="header"><span class="style1">Type</span></td>
<td width="322" class="header"><span class="style1">Description</span></td>
</tr>
{section name=mysec loop=$anime}
<tr class="bottom">
<td><a href="cardspage.php?deck={$anime[mysec].deck}">{$anime[mysec].name}</a></td>
<td>{$anime[mysec].amount}</td>
<td>{$anime[mysec].worth}</td>
<td>{$anime[mysec].type}</td>
<td>{$anime[mysec].features}</td>
</tr>
{/section}
</table>
which works great, but i have to enter the data manually. I'm trying to get it so the array is made from the database
in my php file
// Load the card sets
// Anime
$smarty->assign('anime', array(
array('deck' => 'beautifully', 'name' => 'Beautifully', 'amount' => '20', 'worth' => '1', 'type' => 'character', 'features' => 'Zoisite'),
array('deck' => 'beauty', 'name' => 'Beauty', 'amount' => '20', 'worth' => '1', 'type' => 'character', 'features' => 'Sailor Venus'),
array('deck' => 'berthier', 'name' => 'Berthier', 'amount' => '20', 'worth' => '1', 'type' => 'character', 'features' => 'Berthier')
));
$sql = "SELECT DISTINCT deck, name, amount, worth, type , features FROM cards WHERE `category` = 'Anime' AND (deny=0 OR worth = 3) ORDER BY `type`,name ASC";
$result = mysql_query($sql, $con) or die(sql_error($sql));
while ($row = mysql_fetch_array($result)) {
}
as you can see i'm assigning the values manually. I've got no idea how to do this since its an array within an array. Can anyone point me in the right direction please