using utf-8 in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
davidklonski
Forum Contributor
Posts: 128
Joined: Mon Mar 22, 2004 4:55 pm

using utf-8 in php

Post by davidklonski »

hello

I am storing content in foreign languages in utf-8 php files like so:
$var1 = '<french word>';
$var2 = '<hebrew word>';
$var3 = '<english word>';
$var4 = '<german word>';
...

I would like to display those words in the browser.
I set the character set in the browser to:
<meta http-equiv="Content-Type" content="text-html; charset=utf-8">

but for some reason some of the words come out as junk (for example hebrew)

what is the right way of doing this?
thanks in advance
Post Reply