-1

I have stored in my database some string Unicode and Arabic in the correct form this is the screen of query select

https://i.ibb.co/JyCh9TJ/Screen-Shot-2019-09-11-at-8-45-37-PM.png

when I have used on my code echo $data;

I have this result https://i.ibb.co/28CH9n3/Screen-Shot-2019-09-11-at-8-49-28-PM.png

can you help me show the same data, please

Thank you so much

applicona
  • 1
  • 2

1 Answers1

0

To show UTF-8 content in your HTML, you need to ensure your text is actually in UTF-8 at three stages:

1- The database (which is already good in your case)

2- The PHP query result:

For this, add charset=UTF8; to your database connection string, e.g.:

...Database=myDataBase;User=myUsername;Password=myPassword;charset=UTF8;

3- The HTML output:

For this, add thismeta tag to your HTML document's head:

<meta charset="utf-8">
Anis R.
  • 6,656
  • 2
  • 15
  • 37