Re: Smarty Math using a Variable
Have you tried to use this, which is the number of elements in the array:
x=$subcategories|@count
You can try and print it first, like you were doing before to see if it has the right value:
<p>count: {$subcategories|@count}</p>
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
|