magento 截取字符串

echo $this->htmlEscape(Mage::helper('core/string')->truncate($_product->getName(),10,'...',$new,false));
//$new引用传递
//false是不破坏单词截取,反之

你可能感兴趣的:(magento 截取字符串)