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, ∼4713🔥, 0💬
Popular Posts:
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 EPUB file format? I want to know how to create EPUB books. Here is a larg...
How To Read the Entire File into a Single String in PHP? If you have a file, and you want to read th...
How To Set session.gc_divisor Properly in PHP? As you know that session.gc_divisor is the frequency ...
How to use the "Ctrl-p Ctrl-q" sequence to detach console from the TTY terminal of container's runni...