1

I have a .php page where am getting � character...can you please help me to remove this character from the page?

The code for line where am getting this character is here

<td class='forcedWidth'><?php echo "<a href=".$row->TW_URL.">".$row->EAN."</a>"; ?></td>

I am completely clueless about this character.

Joyeeta Sinharay
  • 185
  • 2
  • 3
  • 14
  • 2
    This character is due to bad encoding. You should figure out where this character is coming from (database, included file, etc) and remove it or convert it to the proper encoding of your site. – mariobgr Sep 09 '14 at 13:59
  • As well as it possibly being from the database, you can define which charset to use in PHP headers and in HTML meta. There is possibly a mismatch. We need to see some code. – Popnoodles Sep 09 '14 at 13:59
  • It can be helpful if you provide the code which gives ? – Gunaseelan Sep 09 '14 at 14:02
  • Check out http://stackoverflow.com/questions/279170/utf-8-all-the-way-through, this might enlighten you.. – Naruto Sep 09 '14 at 14:27

1 Answers1

5

Put this in the head section

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

if that doesn't do it use the utf8_decode command

echo(utf8_decode($text));
Wezy
  • 665
  • 1
  • 5
  • 14