Warning: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/1.php on line 1

Warning: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/0.php on line 1
PHP. Руководство по PHP. 2005 (создание и продвижение сайта)
создание и продвижение сайта (вбиваю в ТОП-10, как гвозди)Настройка и сопровождение платной рекламы яндекс.директ

PHP. Руководство по PHP. 2005

mb_strimwidth

Пред.

След.

mb_strimwidth

(PHP 4>= 4.0.6, PHP 5)mb_strimwidth -- Get truncated string with specified width

Description

string mb_strimwidth (string str, int start, int width [, string trimmarker [, string encoding]])

mb_strimwidth() truncates string str to specified width. It returns truncated string.

If trimmarker is set, trimmarker is appended to return value.

start is start position offset. Number of characters from the beginning of string. (First character is 0)

trimmarker is string that is added to the end of string when string is truncated.

encoding is character encoding. If it is omitted, internal encoding is used.

Пример 1. mb_strimwidth() example

<?php

$str = mb_strimwidth($str, 0, 40, "..>");

?>

See also mb_strwidth() and mb_internal_encoding().

Пред.

Начало

След.

mb_strcut

Уровень выше

mb_strlen

Отвечу на любые вопросы. С уважением, Дмитрий Владимирович.

Ваше письмо×
Free Web Hosting