राम (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 =राम
**sql after = राम**