about arabic variable 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
taherfadloun
Forum Newbie
Posts: 2
Joined: Sat Jul 11, 2009 3:40 pm

about arabic variable in php

Post by taherfadloun »

dear,
i have my own php script that i am using to put folders and files in to an array and show them with links to browse them,
but if there is an arabic title of a file or a folder the variable of that file will be like this (??????) when i use the echo.
please if there is a solution for that proplem will help me tell me plz.....



Taher Fadloun
taherfadloun@hotmail.com
damascus - syria
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Re: about arabic variable in php

Post by Skara »

Try encoding your html page in utf-8 and adding the language tag. That will probably solve the problem.

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
<html lang="ar"> <!-- HTML -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar"> <!-- XHTML -->
robinspaul
Forum Newbie
Posts: 8
Joined: Wed Oct 08, 2008 10:06 am

Re: about arabic variable in php

Post by robinspaul »

Hi,
I downloaded Arabic font from
http://www.freelang.net/fonts/index.php
and I used the above code
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<html lang="ar"> <!-- HTML -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar"> <!-- XHTML -->
Then I copied some arabic content to this page, after converting to arabic using google translater; but, I can't see the arabic
content.
Is there any specific font I need to download.
Thanks,
Paul
Post Reply