note 12171 modified in function.chr by vrana

From: Date: Tue, 17 Aug 2004 14:54:54 +0000
Subject: note 12171 modified in function.chr by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79893@lists.php.net to get a copy of this message
Here is a function that's help me find what chr(number) outputs what character quicker than typing out 256 echo tags. <?php function listChr(){ for ($i = 0; $i < 256; ++$i) { static $genNum; $genNum++; echo "chr($genNum) will output '"; echo (chr($genNum)); echo "'< br>\n"; } } listChr(); ?> Another helpful chr is #9, being a tab. Quite using when making error logs. $tab = (chr(9)); echo "<pre>error{$tab}date{$tab}time</pre>"; -- HappyEvil --was-- Here is a function that's help me find what chr(number) outputs what character quicker than typing out 256 echo tags. function listChr(){ for ($i = 0; $i < 256; ++$i) { static $genNum; $genNum++; echo "chr($genNum) will output '"; echo (chr($genNum)); echo "'< br>\n"; } } listChr(); Another helpful chr is #9, being a tab. Quite using when making error logs. $tab = (chr(9)); echo "<pre>error{$tab}date{$tab}time</pre>"; -- HappyEvil http://php.net/manual/en/function.chr.php

« previous php.notes (#79893) next »