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
Â
⇒PHP Built-in Functions for Strings
⇒⇒PHP Tutorials
2016-10-13, 1219👍, 0💬
Popular Posts:
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...
Where Is the Submitted Form Data Stored in PHP? When a user submit a form on your Web server, user e...
Where to find tutorials on how to work with MySQL Database in PHP? A collection of tutorials to answ...
How to build a test service operation to dump everything from the "context.Request" object in the re...
Where to find tutorials on how to Read and Write Files in PHP? A collection of tutorials to answer m...