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
Did you know?Explore Trending and Topic pages for more stories like this.
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

file_put_contents and createimagefromjpeg
All,
I do somethings and then I have the following code:
file_put_contents('./test/'.$filename

Extract text from string
Hi folks,

I have a string that looks like this:

aaaaaaaaaa:
bbbbbbbbbb (ccccccccc)

How to generate a random array of integers subject to a certain constraint
I am writing a program that asks the user to enter an integer N and then generates a random array of

Simple image grab script.
I was wondering if it was possible and if anyone knew how to make a simple php script that looks at

Code working in IE but not FireFox
I created a dynamic navigation list for my website based off of a table in my database. The code is

How to change Time Zone
HI
I want to change the time zone of the server to another country.How can do that?

Thanks

Help with search.php
Hello All

I need the search engine on a site I am building at the moment to display the searc

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

Passing Arguments to execlp()
I'm writing a program that mimics a unix shell. It's supposed to take commands with arguments and ex

Comparing Values
Hi
I'm reading data from a database and this seems to work OK.

Each system has an associat

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