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

classic dynpro : hide area and auto adjust hights
Hi,

I want to develop a similar user interface as is used in standard transaction MIGO.

LinkedList help
Ok so I just learned quickly about lists, so I have a not too hard project I think, but am having a

PHP & MS Access - Line Break
Hey Guys!

I'm pulling records from an MS Access database and listing them using PHP and I'm r

Not showing whole name with mail () script
I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with

Sql and php order list script problems
Hi im having a few problems with trying to get the coding right on a orders list ive done (or trying

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

Display data returned from Ajaxservices!!
I have a question about displaying results using ajax. I have part of the code below.
$.ajax({

Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter

How would I convert this into code using an if statement?
ES equals exam score m equals $mean s equals $total. I already coded my mean and total so I'm not g

Place specific image in html page when specific name is typed.
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

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