HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

mb_decode_numericentity

Description

The mb_decode_numericentity of Multibyte String for PHP decode HTML numeric string reference to character.

Syntax

mb_decode_numericentity(
    string $string,
    array $map,
    ?string $encoding = null
): string

Parameters

string

The string being decoded.

map

An array that specifies the code area to convert.

[int start1, int end1, int offset1, int mask1, ... int startN, int endN, int offsetN, int maskN]

encoding

The encoding parameter is the character encoding. If it is omitted or null, the internal character encoding value will be used.

Return

The converted string.

Examples

1 · string map

<?

$string = '&#115;&#116;&#114;&#105;&#110;&#103;';
$map = [0, 0xff, 0, 0xff];

$return = mb_decode_numericentity($string, $map);

echo $return;
string

2 · encoding

<?

$string = '&#115;&#116;&#114;&#105;&#110;&#103;';
$map = [0, 0xff, 0, 0xff];
$encoding = 'ASCII';

$return = mb_decode_numericentity($string, $map, $encoding);

echo $return;
string