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

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -