You are here: Re: ascii to hex « PHP Programming Language « IT news, forums, messages
Re: ascii to hex

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация