解码php mysql中的编码值[重复]

This question already has an answer here:

राम (hindi language)

I am working on a table where many rows contains value like this राम it shows in browser like राम and many rows already contains राम but I want to replace all encoded value with decode values for this i used find replace query also put data in form and updated but every time db stores encoded value

Structure of table

hindi   varchar(256)    utf8_unicode_ci

what i did

<?php
echo $queryfetch="select hindi from users where id='2'";
$resultfetch=mysqli_query($c,$queryfetch);
while($row  =   mysqli_fetch_array($resultfetch))
{
echo $queryupdate="update users set hindi='".html_entity_decode($row['hindi'])."' where id='2'";
$resultupdate=mysqli_query($c,$queryupdate);
}
?>
select hindi from users where id='2'

update users set hindi='राम' where id='2'

**
sql before =&#2352;&#2366;&#2350;

**sql after = राम**
</div>

What you have are html-encoded characters. To decode them, you need:

html_entity_decode('&#2352;&#2366;&#2350;')

An example.