php - wrap new line variable with <li> -


we using whmcs , within product section want wrap product <li></li> on every new line. far have done following, gets me items puts them in 1 line, haven't been able work out how assign these stripped values new var wrapped list tag.

{foreach from=$product.features key=feature item=value}         {$value|strip_tags}       {foreachelse}         {$product.description|strip_tags}       {/foreach} 

you can use following code:

{assign var=lines value="\n"|explode:$product.description|strip_tags} <ul> {foreach key=k item=line from=$lines} <li>{$line}</li> {/foreach} </ul> 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -