Currently I created simple website using include system
header.php - contains first part of HTML page (Head, meta tags, JS codes ... etc )
page.php - contains simple php code
page content
My main problem with arabic language
I have to put
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
in page.php, footer.php between <head>
tags otherwise the arabic will not support correctly.
This prevents page validation because of these tags.
Is there any method to avoid this problem ?
Thanks
Apart from all of the answers... Make sure your (HTML/PHP) files are saved with the right encoding utf-8
1- Put this
2- You should also save the documents in UTF-8 not ANSI
All you need is to put this
in a file that you include/include_once in your pages
EDIT. example:
header.html
mypage.php
foot.html
Your headers should appear as the following:
Save your document as utf-8
Encode the arabic string into UTF-8 using a tool like this. (No need to change any settings - that link has the the correct settings you need).
Then use utf8_decode() to decode the string back.
Example: