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, 2426🔥, 0💬
Popular Posts:
How To Pass Arrays By References? in PHP? Like normal variables, you can pass an array by reference ...
How To Pass Arrays By References? in PHP? Like normal variables, you can pass an array by reference ...
Where to find tutorials on JSON (JavaScript Object Notation) text string format? I want to know how ...
How to convert JSON Objects to PHP Associative Arrays using the json_decode() function? Actually, JS...
How To Loop through an Array without Using "foreach" in PHP? PHP offers the following functions to a...