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 charcter 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
Â
⇒PHP Built-in Functions for Strings
⇒⇒PHP Tutorials
2016-10-13, 1227👍, 0💬
Popular Posts:
How To Control Vertical Alignment? By default, text in all table cells are aligned to the top vertic...
What is Azure API Management Developer Portal Admin? The Developer Portal Admin is an Azure Web port...
How To Quote Date and Time Values in SQL Statements in PHP? If you want to provide date and time val...
How to use the API operation 2017 version setting "Rewrite URL template"? The API operation setting ...
How To Read Data from Keyboard (Standard Input) in PHP? If you want to read data from the standard i...