I've a problem with encoding. The output I want is:
string(17) "New & old"
This is also the output when I'm using double quotes.
This is my code. I can't change the single quotes because it's the output of another function.
$string = 'New \x26amp\x3Bamp\x3B old';
$string = iconv('ASCII', 'UTF-8//IGNORE', $string);
var_dump($string);
This is my output:
string(26) "New \x26amp\x3Bamp\x3B old"
So how can I change this behavior when using single quotes. Can you convert a string from single quotes to double quotes?