hi frnds iam new to this group
i had one doubt
there is a function in Javascript charCodeAt().toString() which converts any language from hexformat to String
hence i require equivalent function to the above functio in PHP
the functio in PHP also should convert any language from hexaformat to strings.
help regarding equivalent function in javascript and PHP
Moderator: General Moderators
-
kavyareddy
- Forum Newbie
- Posts: 1
- Joined: Fri Feb 10, 2006 4:25 am
i think maybe something like this
Code: Select all
function hex2str($hex) {
for( $i=0 ; $i < strlen($hex); $i = 2){
$str .= chr(hexdec(substr($hex, $i, 2)));
}
return $str ;
}
echo hex2str("61626áb80C7BA78797a");