>>809
mb_strimwidth(《長い文字列が入った変数》, 0, 《...を含めた最大文字数※全角は2文字扱い》, '...', 'utf-8')

CSSでやるなら
text-overflow: ellipsis;
white-space: nowrap;