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 Link to comment https://forums.phpfreaks.com/topic/208549-hexadecimal-value-calculate/ 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 Link to comment https://forums.phpfreaks.com/topic/208549-hexadecimal-value-calculate/#findComment-1089627 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 Link to comment https://forums.phpfreaks.com/topic/208549-hexadecimal-value-calculate/#findComment-1089720 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.