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, ∼3828🔥, 0💬
Popular Posts:
Can You Add Values to an Array without Keys in PHP? Can You Add Values to an Array with a Key? The a...
How to install "The Windows SDK version 8.1"? I need to build my Visual Studio C++ applications. If ...
How to install .NET Framework in Visual Studio Community 2017? I have the Visual Studio Installer in...
How To Move Uploaded Files To Permanent Directory in PHP? PHP stores uploaded files in a temporary d...
What is EPUB 3.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 3.0 Metadata "dc:publisher" ...