$line) { if (iconv_strlen(trim($msg . "\n" . $line), "UTF-8") <= $limit) { $msg = trim($msg . "\n" . $line); } elseif (($msg == "") || (($row == 1) && (substr($msg, 0, 4) == $recycle))) { // Is the new message empty by now or is it a reshared message? $msg = iconv_substr(iconv_substr(trim($msg . "\n" . $line), 0, $limit, "UTF-8"), 0, -3, "UTF-8") . $ellipsis; } else { break; } } return $msg; } }