|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ggyyvv Smarty n00b
Joined: 02 Feb 2015 Posts: 3
|
Posted: Mon Feb 02, 2015 7:00 am Post subject: How to display an array to a string separated by commas |
|
|
How to display an array to a string separated by commas.
Code: | {foreach name=fields key=key2 item=item2 from=$item1}
{$item2}
{if $smarty.foreach.fields.last}
,
{else}
{/if}
{/foreach} |
displayed
how to make
to remove the spaces |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|