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, ∼2822🔥, 0💬
Popular Posts:
How To Read Data from Keyboard (Standard Input) in PHP? If you want to read data from the standard i...
How to use the "send-one-way-request" Policy statement to call an extra web service for an Azure API...
How To Avoid the Undefined Index Error in PHP? If you don't want your PHP page to give out errors as...
How to access Query String parameters from "context.Request.Url.Que ry"object in Azure API Policy? Q...
How to dump (or encode, serialize) a Python object into a JSON string using json.dumps()? The json.d...