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, 1466👍, 0💬
Popular Posts:
How to use the urllib.request.Request object to build more complex HTTP request? The urllib.request....
What is EPUB 2.0 Metadata "dc:creator" and "dc:contributor" elements? EPUB 2.0 Metadata "dc:creator"...
How to write a policy to set and get custom variables? Here is a policy that sets and gets custom va...
How to Test API as a Publisher Administrator? You can follow this tutorial to test an API operation ...
Where Can I get a copy of the RSS XML Schema? RSS XML Schema is an XML Schema that defines how an RS...