note 36841 added to function.bin2hex

From: Date: Fri, 24 Oct 2003 09:24:43 +0000
Subject: note 36841 added to function.bin2hex
Groups: php.notes 
Request: Send a blank email to php-notes+get-59214@lists.php.net to get a copy of this message
// damn bin2hex() function... i thought it'll give me an "F" if i give it a "1111"... // here's something to convert a binary-string into a hex-string and other direction too: function hexbin($hex) { $bin = decbin(hexdec($hex)); return $bin; } function binhex($bin) { $hex = dechex(bindec($bin)); return $hex; } // simple, isn't it? ---- Manual Page -- http://www.php.net/manual/en/function.bin2hex.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36841 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36841&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36841&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59214) next »