Posted by kuukelekuu on 08/04/06 10:22
Thanks all,
I found it thanks to these posts:
$len = strlen('The lenght of the text is 28');
$a = round(($len / 16));
$b = round(($len - 16) * $a);
echo chr(dechex($b));
Kimmo Laine wrote:
> <kuukelekuu@gmail.com> wrote in message
> news:1154675584.599984.45480@m79g2000cwm.googlegroups.com...
> >I need to convert ascii chars to hex chars.
> >
> > I searched the internet, found hex to ascii, but nowhere is there a
> > ascii to hex method created by anyone.
>
>
> $hex = "64";
> $ascii = "a";
> echo chr(hexdec($hex));
> echo dechex(ord($ascii));
>
> --
> "Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
> http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
> spam@outolempi.net || Gedoon-S @ IRCnet || rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|