I'm try to write code for writing hex value to a file
let say I want to write hex 0xA3 to a file. its work when I put
$string="\xA3";
but not when I put
$a='A3';
$string="\x$a";
actulay second form that I need to use, anybody can help how to do with this ?
<?
$fp = fopen ("result/gen.txt", "w");
$a='A3'; //this is the hex value
$string="\x$a";
fwrite ($fp,$string);
fclose ($fp);
echo 'done';
?>