The php string function hexdec() converts a hex into a number.
number hexdec ( string $hex_string )
In order to convert a hex value into a string, you need the following function. There are no php function designed to convert a hexadecimal to string.
for ($i=0; $i < strlen($hex)-1; $i+=2)
$str .= chr(hexdec($hex[$i].$hex[$i+1]));
The $hex parameter is a string which represent a hex value.
It returns a string which is the string converted.
Example: We have the hex "48654c4c6f20576f526c4421"
The php hex to string function returns the value "HeLLo WoRlD!". This is the string value that has been converted from the hex "48654c4c6f20576f526c4421"
Test it online using our Hex-to-String Tool
Review of my Blackberry Torch August 23rd, 2010
Hi guys, I got the new iphone 4, I should be reviewing this iphone 4 and his case very soon! July 6th, 2010
Here's my review on justhost web hosting service May 14th, 2010
We will be talking about hosting server, dedicated server and shared server very soon!. We will be talking about C# and hosting servers May 8th, 2010
The String Function Tools are designed to give you the most-used string functions
4. Url Encoding
8. Url Decoding
10. Html Decoding
If you have a question, noticed a problem, want to share an idea or simply want to comment this page, fill the box below and hit the "Submit" button