Witam.
Mam tekst w bazie o dłógości np. 500 znaków.
W jaki sposób moge wyświetlić piewsze 100 znaków tego tekstu ?
Pozdrawiam.
<?php /** * Purpose: Truncate a string to a certain length if necessary, * optionally splitting in the middle of a word, and * appending the $etc string. * @param string * @param integer * @param string * @param boolean * @return string */ function truncate($string, $length = 80, $etc = '...', $break_words = false) { if ($length == 0) return ''; if (!$break_words) } else return $string; } ?>