Echo certain value from smarty array
Posted
by zx
on Stack Overflow
See other posts from Stack Overflow
or by zx
Published on 2010-04-29T07:33:29Z
Indexed on
2010/04/29
7:37 UTC
Read the original article
Hit count: 333
Hi,
So currently I have an array with smarty..
{foreach from=$_sequences key=k item=v}
Name => {$v.menu}
Type => {$v.type}
Step => {$v.pri}
Data =>{$v.data}
{/foreach}
which gives me
Name => Test
Type => Audio
Step => 1
Data => audio1
Name => Test2
Type => Audio
Step => 2
Data => audio2
Name => Test3
Type => Audio
Step => 3
Data => audio3
Now how would I get the data for step => 2 to echo out?
So from that foreach I only want to display "audio2"
© Stack Overflow or respective owner