maerco Posted July 22, 2010 Share Posted July 22, 2010 I want to obtain the same result of first code also for the second code, someone can give me directions? $CODE = "\x00\x23\x8E\x01\x02\x03"; echo code // result: #Ž 1 $CODE="00238E010203"; $CODE=chunk_split($MAC,2,"\x"); $CODE= "\x" . substr($MAC,0,-2); echo $CODE; // result \x00\x23\x8E\x01\x02\x03 Quote Link to comment Share on other sites More sharing options...
Mchl Posted July 22, 2010 Share Posted July 22, 2010 echo pack('H*',"00238E010203"); [edit] Changed format a bit Quote Link to comment Share on other sites More sharing options...
maerco Posted July 22, 2010 Author Share Posted July 22, 2010 Thanks Mchl, Is exactly what i need. This is a very powerful form, will take high position on my delicious Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.