Praveen JP
Praveen JP

Reputation: 105

How to encode the Chinese word using PHP?

I need to encode the Chinese word using php for an example

%E7%8F%AD%E7%BA%B3-bangna

to

班纳-bangna

Please try to give me a good solution for me..

Thank you.

Upvotes: 1

Views: 42

Answers (1)

Samir Selia
Samir Selia

Reputation: 7065

Use urldecode

$str = "%E7%8F%AD%E7%BA%B3-bangna";
echo urldecode($str);

Output

班纳-bangna

Demo

Upvotes: 2

Related Questions