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
Â
⇒PHP Built-in Functions for Strings
⇒⇒PHP Tutorials
2016-10-13, 1387👍, 0💬
Popular Posts:
Where to find tutorials on how to create Your Own Functions in PHP? A collection of tutorials to ans...
How to use the JSON to XML Conversion Tool at utilities-online.info? If you want to try the JSON to ...
What is Azure API Management Publisher Dashboard? Azure API Management Publisher Dashboard is an Azu...
Where to get the detailed description of the json_encode() Function in PHP? Here is the detailed des...
How to View Atom Feeds with IE (Internet Explorer)? If you want to view Atom Feeds with IE (Internet...