decode entities
This function decodes character entities entities (like € ac; €) into actual characters.
Note: Character entities specified as string constants inside single quotation marks (as softquoted strings) in the B4P code
will be converted automatically, quasi at compile time, and do not reuqire this function to be called.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
string | input string This string contains entity-encoded special characters |
Type | Description |
---|---|
string | String with decoded characters Converted string with decoded characters |
Invalid character code (outside 0 - 1114111 range)
echo( decode entities( "4.50 € / 4.50 € / 4.50 € / 4.50 €" ) );
echo( "4.50 €" ); // Quoted string are not decoded.
echo( '4.50 €' ); // Softquoted string is already decoded implicitly.
echo( '4.50 &eur' + 'o;' ); // This one is not because full entity is not in one softquoted string value
4.50 € / 4.50 € / 4.50 € / 4.50 €
4.50 €
4.50 €
4.50 €