Inserting Arabic text with PHP into MySQL Database

We need to set the encoding of texts we store into database to UTF-8 if we work with Arabic texts. Otherwise, Arabic texts appear like ?????????? in our database.

Once we create a database connection variable, we must set it’s charset into UTF-8 like this:

$connection = mysqli_connect("localhost", "username", "password","db");

And one more thing, we need to set our table (or a specific row) collation to utf8_general_ci like this:

Getting boored? Why not playing a game?

Power Block

Tiki Solitaire

Pet Connect

Cake Shop

Jewels Blitz 3

Forest Match

Bike Racing


Solitaire Swift

Bubble Shooter Classic HD

Black and white snake

Leave a Reply

Your email address will not be published. Required fields are marked *