Tools, FAQ, Tutorials:
Converting Strings to Hex Numbers in PHP
How To Convert Strings to Hex Numbers?
✍: FYIcenter.com
If you want convert a string into hex format, you can use the bin2hex() function. Here is a PHP script on how to use bin2hex():
<?php $string = "Hello\tworld!\n"; print($string."\n"); print(bin2hex($string)."\n"); ?>
This script will print:
Hello world! 48656c6c6f09776f726c64210a
⇒ Generating Character from ASCII Value in PHP
⇐ Comparing Two Strings with strcmp() in PHP
2016-10-13, ∼3680🔥, 0💬
Popular Posts:
Where to find EPUB Sample Files? Here is a list of EPUB sample files collected by FYIcenter.com team...
How to how to use matched string and groups in replacements with re.sub()? When calling the re.sub()...
How To Copy Array Values to a List of Variables in PHP? If you want copy all values of an array to a...
How to use the "send-one-way-request" Policy statement to call an extra web service for an Azure API...
How to use the "return-response" Policy statement to build the response from scratch for an Azure AP...