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
No comments posted yet

Your Answer:

Login to answer
72 Like 24 Dislike
Previous forums Next forums
Other forums

Select Lists into MYSQL
Hello All, I am new to PHP @ 1 week. So borrowing code anywhere I can. I am making progress, but h

retrieving policy name inside the function called by this particular policy
Hi there,

I've playing around with dbms_rls package, trying to set up some security repo

finding key position of specified value in multi-dimensional array
Code: $openedfile = fopen($tfc_file4, "r");
$rc = 1;
while(!feof($openedfile))
{<

Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email

need help in creating captcha
hi i have a problem creating captcha system. i create some basic script for image displaying but it

sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is somet

radio button reamains checked
Hello i'm trying to keep the state off my radio buttons so it shows which ones where clicked after t

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

Changing files over
Just thought I'd start with the new forums looking really nice .

Ok basically I've made this

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