Mailinglisten-Archive |
Aloha,
> Von: Anton Funk[SMTP:anton.funk at major-new-media.de]
>
> Hallo @ all
> also
> mal eine knifflige Frage an euch
>
> ich habe eine Zahl (Dezimal) Denkt euch eine aus...iss mir egal ;o)
> (bis 4000)
>
> Diese muss 32bit (also 4 Byte) little endian (LeC) hex (Hex) codiert
> werden
>
http://de3.php.net/pack
> also
>
> Dec = 356
> Hex = 164
> LeC(32Bit) = 04 16 00 00
>
> Dec = 18
> Hex = 12
> LeC(32) = 12 00 00 00
>
ungetestet
$sZahl = 356
$sLittleEndianZahl = pack("V*",$sZahl);
Grüße, Mathias
php::bar PHP Wiki - Listenarchive