PHP bin2hex() Function - PHP Views : 319
Tagged in : PHP
0 0
Send mail
The bin2hex() function converts a string of ASCII characters to hexadecimal values. The string can be converted back using the pack() function.

Syntax:
bin2hex(string)


Example:

<?php
$str = "Hello world!";
echo bin2hex($str);
?>


The output of the code above will be:
48656c6c6f20776f726c6421
By Rekha, On - 2010-01-28



    Login to add Comments .