Friday, September 2, 2011

Smarty split a String

$item ='FFFEREE-TGFFGGF-RERR'

This is the can used to split smarty variable.

{assign var="bar_at" value=$item|strpos:"-"}
 <li>{$item}</li>
 <li>{$item|substr:0:$bar_at}</li>
<li>{$item|substr:$bar_at+1}</li>

1 comment:

  1. Have you started your homework yet for next season's hockey pool draft? dunnylocksmith.com

    ReplyDelete