[Smarty] Récuper une variable php à partir d'une variable Smarty
en gros j'ai ce code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| <table>
{section name=idx loop=$mycart}
<tr style="background-color:{cycle values="#ffffcc, #cccccc"};">
<td>{$mycart[idx].cat}</td>
<td>{$mycart[idx].artist}</td>
<td>{$mycart[idx].album}</td>
<td>{$mycart[idx].year}</td>
<td>{$mycart[idx].price}</td>
<td>{$mycart[idx].quantity}</td> <---- Ici
<td>{$mycart[idx].total}</td> <----- Et là
</tr>
{/section}
</table> |
J'aimerai pouvoir utiliser quelque chose du genre " $_SESSION['cart'][$mycart[idx].cat]['price'] et $_SESSION['cart'][$mycart[idx].cat]['quantity'] "
Est il possible d'arriver à un tel resultat ?