Multi Language Unicode support in PHP

Hi guys, Now I am going to tell how to add multi language support for your website

Step 1:

Create a header with charset utf-8 with the following code and add this code into your header file

[php]header(‘Content-Type: text/html; charset=utf-8’);[/php]

Step 2:

[php]

// Create an array of names:

$names = array(‘João’, ‘Γιώργος’, ‘Anton’, ‘Tomáš’, ‘Kamilė’, ‘Frančiška’, ‘愛子’, ‘杰西卡’);

// Loop through the array:

foreach ($names as $name) {
echo "<p>$name has " . strlen($name) . " characters<br />n";
echo strtoupper($name) . " in capital letters</p>n";
}

[/php]

Please don’t forget to share and subscribe to latest updates of the blog. Also any comments and feedback are all welcome!

Thanks!

View Demo

You May Also Like

Never Miss Any Web Tutorials, Guides, Tips and Free eBooks

Join Our Community Of 50,000+ Web Lovers and get a weekly newsletter in your inbox

 

I hate spam too. Unsubscribe at any time.

1 thought on “Multi Language Unicode support in PHP”

  1. It’s unprofessional, and a violation of copyright law, for you to post this code as if it were your own when it actually comes from my “PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide” book. Is there a reason you didn’t credit the source of this code?

    Reply

Leave a Comment