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, ∼5146🔥, 0💬
Popular Posts:
Where can I download the EPUB 2.0 sample book "The Metamorphosis" by Franz Kafka? You can following ...
How To Truncate an Array in PHP? If you want to remove a chunk of values from an array, you can use ...
How to add request URL Template Parameters to my Azure API operation to make it more user friendly? ...
How to use the "find-and-replace" Policy Statement for an Azure API service operation? The "find-and...
How To Convert a Character to an ASCII Value? If you want to convert characters to ASCII values, you...