I'm using these 2 functions to convert hex to strings, and string to hex:

PHP Code:
function convertASCIIToChr($theContent)
{
// http://au.php.net/bin2hex

if (!is_string($theContent)) return null;
$r='';
for (
$a=0$a<strlen($theContent); $a+=2) { $r.=chr(hexdec($theContent{$a}.$theContent{($a+1)})); }
return 
$r;
}

function 
convertChrToASCII($theContent)
{

return 
bin2hex($theContent);

The problem is that if I convert the following:

Code:
<div class="someclass">
Sometext
</div>
I will get this on the other end:

Code:
<div class=\"someclass\">
Sometext
</div>
It took me a while to figure out why some of my classes weren't working, but I eventually got it .

Does anyone know a way around this?