- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
chr() function in PHP
The chr() function returns the specific characters. It converts an ASCII value to a character.
Syntax
chr(ascii)
Parameters
ascii − Specify the ASCII value
Return
The chr() function returns the character of the ASCII value passed.
The following is an example −
Example
<?php $val = 50; echo chr($val); ?>
The following is the output −
Output
2
Let us see another example −
Example
<?php $val = 88; echo chr($val); ?>
The following is the output −
Output
X
Advertisements