Monday, May 25, 2009

Convert Hex to String

function hex2string($hex)
{
$string = NULL;
$hex = str_replace(array("\n","\r"), "", $hex);
for ($i=0; $i < $strlen($hex);$i++)
{
$string.= chr(hexdec(substr($hex, $i, 2)));
}
return $string;
}
?>

No comments: