Greek characters in php


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I'm making a script and I m using for first time greek characters.
I started to write a simple drop down menu that loads some city names from the
database. The names are in Greek in the database and the database is set in utf8_general_ci,
but in the drop down was appearing only some "?????????" question marks.

I also add this in the code in the head part
<meta http-equiv='Content-Type' content='text/html; charset utf-8'/>

and finally I added this in the file I make the connection with the database
mysql_query("SET NAMES 'utf8'", $conn);

after the final addition the characters changed from question marks and now the drop down
appears like this


I think I m close to solve it, but probably I m missing something.
If anyone knows something I would appreciate it.

Thank you in advance!

No comments posted yet

Your Answer:

Login to answer
140 Like 43 Dislike
Previous forums Next forums
Other forums

How to clone an SAP ECC using bacup tape on z/os?
We want to clone our production to a different SID using backup tape.

Displaying Site Logo/Icon on a Title tag
really need some help out here. I want to insert a Logo/Icon just like the one close to the "PH

Ariba 9r - SAP MM Integration
Hi experts,

The standard Ariba adapter for 9r creates a relationship between Cost Centers

Sufficient protection from bad input?
I am writing a simple script to let people upload 'pages' of their own content, be it simply a few b

ok i need to join all this pages to make 1 neat code
i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i

ClientScript.RegisterClientScriptBlock Issue
This is what I haveview plaincopy to clipboardprint?Protected Sub posrback_Click(ByVal sender As Obj

matching numbers inside ( )
I know I can match numbers by just [0-9]+, so I thought matching numbers inside ( ) would be somethi

A little help needed passing hidden values to next page
I have a page that has hidden values in a form.

example
Code: <input name='signupID

Why does my crawler script suddenly end with no error?
Hi.

I have written a web crawler script. It will visit a large number of URL's with cURL.

foreach help.
Hello all,

First time I'm attempting to use a foreach statement and was just wondering if my

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash