Php chr
From w3cyberlearnings
Contents |
PHP function chr
This function returns a character from ASCII value.
Syntax chr
- ascii value
chr(ascii)
Example 1
<?php echo chr(75); ?>
Output
K
Example 2
<?php $ascii_aa= array(50,51,52,53,54,64,58); foreach($ascii_aa as $ascii) { echo $ascii. '-> '. chr($ascii). '<br/>'; } ?>
Output
50-> 2 51-> 3 52-> 4 53-> 5 54-> 6 64-> @ 58-> :