<?php $bdata = unpack("nint1/nint2", $data); echo "The first integer in the packed data: {$bdata['int1']}<BR>"; echo "The second integer in the packed data: {$bdata['int2']}<BR>"; ?>