Fragment odpowiedzialny za wypisywanie -
Kod: Zaznacz cały
$topics_html .= "<a href=\"{$path}viewtopic.php?t={$topic['topic_id']}\">{$topic['topic_title']}</a><br />";
Dzięki.
Kod: Zaznacz cały
$topics_html .= "<a href=\"{$path}viewtopic.php?t={$topic['topic_id']}\">{$topic['topic_title']}</a><br />";
Kod: Zaznacz cały
function short_text($string, $characters)
{
if (strlen($string) >= $characters)
{
$shortcut = substr($string, 0, $characters) . '…';
}
else
{
$shortcut = $string;
}
return $shortcut;
}
Kod: Zaznacz cały
short_text('ciąg znaków', x);
Kod: Zaznacz cały
function short_text($string, $characters)
{
if (strlen($string) > $characters)
{
return substr($string, 0, $characters) . '…';
}
return $string;
}