Hi Everyone,
I have a value: �šš
which need to become: 0, 31, 22, -102, -102, 6
When is use ord
$code = "�šš";
echo(ord($code[0]));
echo(ord($code[1]));
echo(ord($code[2]));
echo(ord($code[3]));
echo(ord($code[4]));
echo(ord($code[5]));
The outcome = 0, 31, 22, 154, 154, 6
Could anyone help me out on this one?
The original code is in java and when using �šš it automaticly become's 0, 31, 22, -102, -102, 6 in a string.
Thanks in advance.
ascii to decimal
Moderator: General Moderators
Re: ascii to decimal
I think your problem may be in your character encoding. The character, whatever it is, is not displaying on my computer, which likely means that it is not utf-8.