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, ∼5501🔥, 0💬
Popular Posts:
Can Two Forms Be Nested? Can two forms be nested? The answer is no and yes: No. You can not nest two...
How To Read a File in Binary Mode in PHP? If you have a file that stores binary data, like an execut...
How to extend json.JSONEncoder class? I want to encode other Python data types to JSON. If you encod...
Where can I download the EPUB 2.0 sample book "The Problems of Philosophy" by Lewis Theme? You can f...
What is Azure API Management Developer Portal? Azure API Management Developer Portal is an Azure Web...