Re: Binary data -> number
| From: | Jason Wong | Date: | Wed, 16 Apr 2003 09:22:54 +0000 |
| Subject: | Re: Binary data -> number | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144092@lists.php.net to get a copy of this message | ||
On Wednesday 16 April 2003 09:37, Adam Atlas wrote:
> I have some code that reads binary data (a series of bytes representing
> numbers, not ASCII characters) and I want to know how I'd extract the
> numerical value of multiple bytes. For example, if I had two bytes with
> the hex value 0xFFFF, I'd like to know how to get its decimal value,
> 65535 (I think). (But remember, this is just binary data, not a string
> representation of hex or binary.)
Doesn't bin2hex() do what you want?
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
This novel is not to be tossed lightly aside, but to be hurled with great
force.
-- Dorothy Parker
*/