Re: Byte conversion

From: Date: Mon, 25 Jun 2007 21:01:38 +0000
Subject: Re: Byte conversion
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-257761@lists.php.net to get a copy of this message
On 25/06/07, Eric Butera <eric.butera@gmail.com> wrote:
I've been trying to figure out a way to do this all day and I'm afraid I might need a bit of help. Basically I am trying to port over something from Java to PHP and I'm stuck on one particular piece of code: if ((ba[i + 0] == (byte)0xa7) && (ba[i + 1] == (byte)0x51)) { [...]
I tried [...]
        if ($char == 0xa7 && $char == 0x51) {
[...]
but it never matches. Any pointers?
$char can't have two values at once... -robin

« previous php.general (#257761) next »