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
2016-10-13, 305👍, 0💬
Popular Posts:
Can You Specify the "new line" Character in Single-Quoted Strings? You can not specify the "new line...
How To Pad an Array with the Same Value Multiple Times in PHP? If you want to add the same value mul...
Where to find tutorials on PHP language? I want to know how to learn PHP. Here is a large collection...
What Is an HTML "code" Tag/Element? An "code" element is an inline element that you can use to speci...
Where to find tutorials on how to use PHP built-in functions to manage arrays? A collection of tutor...