Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Show-ASCII-table/PHP/show-ascii-table.php
Normal file
16
Task/Show-ASCII-table/PHP/show-ascii-table.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
echo '+' . str_repeat('----------+', 6), PHP_EOL;
|
||||
for ($j = 0 ; $j < 16 ; $j++) {
|
||||
for ($i = 0 ; $i < 6 ; $i++) {
|
||||
$val = 32 + $i * 16 + $j;
|
||||
switch ($val) {
|
||||
case 32: $chr = 'Spc'; break;
|
||||
case 127: $chr = 'Del'; break;
|
||||
default: $chr = chr($val) ; break;
|
||||
}
|
||||
echo sprintf('| %3d: %3s ', $val, $chr);
|
||||
}
|
||||
echo '|', PHP_EOL;
|
||||
}
|
||||
echo '+' . str_repeat('----------+', 6), PHP_EOL;
|
||||
Loading…
Add table
Add a link
Reference in a new issue