如何在php中转换代码十进制值

I have string with Code Decimal and want convert like this:

Current sting:

24⃧ Guage Rake;

And want to convert like this:

24" Guage Rake

I have tried with this but not getting proper result:

$string = "hello&#8423";
htmlspecialchars_decode($string, ENT_NOQUOTES);

Any Idea?

Thanks

htmlspecialchars_decode() only changes a few characters like quotation marks.

You need to use html_entity_decode() instead. Also, "hello&#8423" is missing a semicolon. Should be "hello⃧" "hello″".

Try this:

header("Content-Type: text/plain; charset=UTF8");
$string = "hello″";
$string = html_entity_decode($string, ENT_NOQUOTES);
echo $string;

Try to use html_entity_decode instead:

<?php
$string = '24 - your entity: ->  &#8243; <- -  Guage Rake;';
$decoded = html_entity_decode($string);
echo "$decoded
";