- Code: Select all
<?php
$text ="world";
$str="hello ".str_replace("/","&",$text);
$hex1=bin2hex($str);
function random($match) {return $match[1].rand(0,9);}
$hex2=preg_replace_callback("/([a-zA-Z0-9]{2})/",'random',$hex1);
echo $hex2;
?>
i need help to pack from $hex2 to get original text "hello world" please help me


