0

how can I write this line :

$value['description'][0]

in Smarty?

I tried to write it in this way :

{$value.description[0]}

But it's not working.

1

3 Answers 3

2

This u need

{$value.description.0}
Sign up to request clarification or add additional context in comments.

Comments

0

you can use this on smarty

{foreach from=$value key=k item=v}
   <li>{$k}: {$v}</li>
{/foreach}

Comments

0

In fact you can do it either using dot operator:

{$value.description.0}

or using PHP-like syntax:

{$value['description'][0]}

Both will work.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.