mb_substr
mb_substr
Get part of string
string **mb_substr** string $string int $start $length $encoding
Performs a multi-byte safe
operation based on
number of characters. Position is
counted from the beginning of
. First character's position is
0. Second character position is 1, and so on.
substr``string
string
The to extract the substring from.
string
start
If is non-negative, the returned string
will start at the 'th position in
, counting from zero. For instance,
in the string '', the character at
position is '', the
character at position is
'', and so forth.
start``start``string``abcdef``0``a``2``c
If is negative, the returned string
will start at the 'th character
from the end of .
`start``start``string`
length
Maximum number of characters to use from . If
omitted or is passed, extract all characters to
the end of the string.
string``NULL
encoding
returns the portion of
specified by the
and
parameters.
mb_substr``string``start``length
mb_strcut``mb_internal_encoding