Tag Archives: php chr

chr

Syntax: string chr ( int $ascii ) Description: Returns a one-character string containing the character specified by ascii. Example 1 <?php $str=”hai”.chr(32).”how”.chr(32).”are”.chr(32).”you”; echo $str; ?> OUTPUT hai how are you Example 2 <?php echo sprintf(“1*1=%c”, 49); echo ‘<br/>’; echo sprintf(“1*2=%c”, 50); ?> OUTPUT 1*1=1 1*2=2