Tools, FAQ, Tutorials:
Converting Character to ASCII Value in PHP
How To Convert a Character to an ASCII Value?
✍: FYIcenter.com
If you want to convert characters to ASCII values, you can use the ord() function, which takes the first character of the specified string, and returns its ASCII value in decimal format. ord() complements chr(). Here is a PHP script on how to use ord():
<?php
print(ord("Hello")."\n");
print(chr(72)."\n");
?>
This script will print:
72 H
⇐ Generating Character from ASCII Value in PHP
2016-10-13, ∼5376🔥, 0💬
Popular Posts:
Why am I getting this "Docker failed to initialize" error? After installing the latest version of Do...
Where to get the detailed description of the JSON.stringify() Function in JavaScript? Here is the de...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...
How to use the "set-backend-service" Policy Statement for an Azure API service operation? The "set-b...
Where to find tutorials on EPUB file format? I want to know how to create EPUB books. Here is a larg...