In PHP when i read the Data, let say the data (chunks of strings) is containing HTML Special Character DECIMAL HEX Codes like:
This is a sample string with œ and š
We can say above HEX codes are the source codes of its correspondence Symbol and these will be rendered as correct Symbols in Browser.
But what i want to do is, for these characters (for example), i want these HEX(es) as the converted original Character Symbols like:This is a sample string with œ and š
So how can i detect the any of decimal HEX Codes inside a string and convert each of them into final Symbol(s), instead of keeping HEX codes?
Note:
For more clearence, is there any function to detect and convert the Hex to Symbol?
Like:œ => œš => š
1 Answer