I have a string like the following:
$test = "<div style=\"font-weight:bold;\">\334berraschung!</div>";
When I output this as it is on a web page, it displays correctly:
Überraschung!
...because \334 is the code for Ü in ISO-8859-1. But what I need, is the Html-Entity of the character (and of the whole string, so a replacement for all these ...-Characters), which in this case would be:
Überraschung!
or even better the Unicode entity
Überraschung!
How can I convert this in PHP?