note 45062 added to language.types.type-juggling
| From: | tom5025_ at hotmail dot com | Date: | Tue, 24 Aug 2004 20:27:46 +0000 |
| Subject: | note 45062 added to language.types.type-juggling | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-75221@lists.php.net to get a copy of this message | ||
function strhex($string)
{
$hex="";
for ($i=0;$i<strlen($string);$i++)
$hex.=dechex(ord($string[$i]));
return $hex;
}
function hexstr($hex)
{
$string="";
for ($i=0;$i<strlen($hex)-1;$i+=2)
$string.=chr(hexdec($hex[$i].$hex[$i+1]));
return $string;
}
to convert hex to str and vice versa
----
Manual Page -- http://www.php.net/manual/en/language.types.type-juggling.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45062
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45062&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45062&report=yes
Search -- http://master.php.net/manage/user-notes.php