note 11966 added to function.bin2hex.php
| From: | gherson at php2 dot chek dot com | Date: | Thu, 15 Mar 2001 17:56:57 +0000 |
| Subject: | note 11966 added to function.bin2hex.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-12437@lists.php.net to get a copy of this message | ||
As is, the
function hex2bin($hex_data){
return (DecBin(HexDec($hex_data)));
}
suggested above will return actual ones and zeroes as opposed to a binary string interpreted as
ascii. E.g., "11000010110001001100011" gets returned instead of "abc".
http://www.php.net/manual/en/function.bin2hex.php