Unpacking Values From Binary Data Using Unpack()

<?phpphp
     $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 />";
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.