unpack() to make my
binary from C# into an array of something? To push it to the database with a
POST. But with my
GET, I want to send back the
byte or now a medium blob from the database.
Do I use the same format with
pack() as I did with
$arrData = unpack("H*hex", $bytes); $content = "0x" . $arrData['hex'];
Yes, you can use the same format, but without the name suffix.
$arrData = unpack("H*hex", $bytes); $bytes = pack('H*', $arrData['hex']); // H* only