lolalola Posted June 21, 2010 Share Posted June 21, 2010 Hi,whats wrong with my code(don't get values from $nArray) ? {$nArray = array(25, 35, 55)} {foreach from=$nArray item=nValue} {$nValue|escape:'htmlall':'UTF-8'} {/foreach} Link to comment Share on other sites More sharing options...
rocky Posted June 22, 2010 Share Posted June 22, 2010 You can't write PHP code like that in Smarty. You must use the following instead: {assign var='nArray' value=','|explode:'25,35,55'} Link to comment Share on other sites More sharing options...
lolalola Posted June 22, 2010 Author Share Posted June 22, 2010 Thanks for help, but something wrong.result is:\',\'|explode(\'25,35,55\') Link to comment Share on other sites More sharing options...
rocky Posted June 22, 2010 Share Posted June 22, 2010 My mistake. I've updated my code. Please try again. Link to comment Share on other sites More sharing options...
lolalola Posted June 22, 2010 Author Share Posted June 22, 2010 Thanks a lot Link to comment Share on other sites More sharing options...
rocky Posted June 22, 2010 Share Posted June 22, 2010 If your issue is resolved, please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
Recommended Posts