In PHP I have an array of bytes that I want to turn into a single variable.
$bytes = array(0x12, 0x8D, 0x9D, 0x40, 0x09, 0x64, 0x5A, 0x6E);
I figured I could create a string like so:
$string = chr(0x12).chr(0x8D)......;
but that seems hacky.
Any suggestions?
1 Answer