cHuBakA
Registered
Работи си перфектно но ми изкарва целия текст от емисията.
Как мога да огранича текста (description) примерно до 150 символа
10x
Как мога да огранича текста (description) примерно до 150 символа
Код:
$intLinkStart = '<a class="item_link" href="' . $oItem->link . '" >';
$strOutput .= '<div class="item">';
$strOutput .= '<div class="title">' . $intLinkStart . strip_tags($oItem->title) . '</a></div>';
//$strOutput .= '<div class="text">' . strip_tags($oItem->description->asXml()) . '</div>';
$desc = strip_tags($oItem->description);
$strOutput .= '<div class="text">' . $desc . '</div>';
$strOutput .= '</div>';
unset($tmp);
$intCount++;
if($intCount >= $intMaxItems){
break; //leave foreach loop
10x