how to read first 48 bytes of a binary variable

Status
Not open for further replies.
C

clau

I have a binary variable, say $binarydata, which contains a file that was kept in a MySQL database and I need to get the first 48bytes to put in variable $header.... now how do I do this?

I read about unpack and thought it might help me but can't figure out the syntax.

anyone can help?
 
Status
Not open for further replies.
Top