Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to convert hexadecimal values to ASCII characters?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 106
    Comment on it

    To convert hexadecimal values to ASCII characters we will use a PHP function hex2bin().

    Syntax:

    hex2bin(string);
    

    In above line we have a passed a parameter string in the function which is basically the hexadecimal value that we need to convert to ASCII characters. It is the required field. If success this function returns the ASCII value else returns false. To use this function you will required 5.4.0+ version of PHP on the server.

    For example:

    <?php
    echo hex2bin("48656c6c6f20576f726c6421");
    ?>
    

    The output of the above code is

    Hello world
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: