Gunjan Patel
Gunjan Patel

Reputation: 2372

How to convert unicode in php?

I want to convert my string to Unicode like if "ग" than give output like "0917" or "917" any one of them.

Link for Unicode of string i want

Please give me a Hint i used ord() but it's not work proper.

$ord = mb_convert_encoding("ग", 'HTML-ENTITIES', 'UTF-8');
echo $ord;

$ord = ord("ग");
echo $ord;    // 224 output

Both try but not working.

Upvotes: 0

Views: 114

Answers (1)

user3077158
user3077158

Reputation:

iconv — Convert string to requested character encoding

http://php.net/manual/en/function.iconv.php

Upvotes: 1

Related Questions