Re: Byte conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/06/07, Eric Butera <eric.butera@xxxxxxxxx> 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux