S
S
Secret732017-06-05 15:02:43
PHP
Secret73, 2017-06-05 15:02:43

How to find the sum of values ​​in a variable?

Hello. There is such a code. smarty template engine. How to get the amount of {$item.cartitem.amount} ?

{foreach $order_data.items as $n=>$item}
      <tr class="tr">
        <td class="td">{$item.cartitem.amount}</td>
      </tr>
    {/foreach}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2017-06-05
@Secret73

{count($item.cartitem.amount)}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question