Using str_replace with smarty variable
Posted
by zx
on Stack Overflow
See other posts from Stack Overflow
or by zx
Published on 2010-04-29T11:52:32Z
Indexed on
2010/04/29
11:57 UTC
Read the original article
Hit count: 1078
Hello,
Basically I just want to strip out a part of my smarty variable contents.
{foreach from=$_sequences key=k item=v}
{if $v.pri == $smarty.get.cf && $v.type == 'TTS'}
{$v.data}
{/if}
{/foreach}
{$v.data}
will echo out 21,5555555555
I want it to only echo out 5555555555. I tried str_replace
but couldn't get it working..
str_replace('"','',${v.data});// - doesn't work
str_replace('"','',$v.data);// - doesn't work
What would be the best way I can accomplish this?
© Stack Overflow or respective owner