Tools, FAQ, Tutorials:
Generating Character from ASCII Value in PHP
How To Generate a Character from an ASCII Value?
✍: FYIcenter.com
If you want to generate characters from ASCII values, you can use the chr() function. chr() takes the ASCII value in decimal format and returns the character represented by the ASCII value. chr() complements ord(). Here is a PHP script on how to use chr():
<?php
print(chr(72).chr(101).chr(108).chr(108).chr(111)."\n");
print(ord("H")."\n");
?>
This script will print:
Hello 72
⇒ Converting Character to ASCII Value in PHP
⇐ Converting Strings to Hex Numbers in PHP
2016-10-13, ∼3068🔥, 0💬
Popular Posts:
How to create a "Sign-up or Sign-in" user flow policy in my Azure AD B2C directory? If you want to b...
How to extend json.JSONEncoder class? I want to encode other Python data types to JSON. If you encod...
How To Truncate an Array in PHP? If you want to remove a chunk of values from an array, you can use ...
How to view API details on the Publisher Dashboard of an Azure API Management Service? You can follo...
How To Read a File in Binary Mode in PHP? If you have a file that stores binary data, like an execut...