In this article, you will learn how to convert hexadecimal string to ASCII characters. The hex2bin() function convert the string of hexadecimal values to ASCII characters.
What is the syntax of the HEX2BIN() function?
hex2bin(string)
Parameters | Details |
---|---|
string | The value in hexadecimal to convert to ASCII character – Required |
examples of the HEX2BIN() function
Example 1. In this example, we convert a hexadecimal value to ASCII character.
<?php
echo hex2bin("84566f6c6f20576f726c44221");
?>