The Mind of Scott

PHP - The opposite of the bin2hex function


The opposite of the bin2hex function is:    pack('H*', $HexWord);
Sample PHP code, note comment slashes:
<?PHP //bin2hexANDback.PHP $Word = "FREDDY"; var_dump($Word); echo '<BR>'; $HexWord = bin2hex($Word); var_dump($HexWord); echo '<BR>'; $WordAgain = pack('H*', $HexWord); echo '<BR> WordAgain with pack H*'; var_dump($WordAgain); echo '<BR>'; ?>
Tech Stuff Page

Home