Skip to content

Instantly share code, notes, and snippets.

@olzaragoza
Last active July 29, 2016 00:33
Show Gist options
  • Save olzaragoza/c761e9b6abaddc732e94c3ebfbbcadb9 to your computer and use it in GitHub Desktop.
Save olzaragoza/c761e9b6abaddc732e94c3ebfbbcadb9 to your computer and use it in GitHub Desktop.
a simple PHP code block displaying ascii numbers and letters
<?php
// 0-9
echo '<br>ascii(48-57): ';
for ($i = 48; $i <= 57; $i++) {
echo chr($i);
}
// A-Z
echo '<br>ascii(65-90): ';
for ($i = 65; $i <= 90; $i++) {
echo chr($i);
}
// a-z
echo '<br>ascii(97-122): ';
for ($i = 97; $i <= 122; $i++) {
echo chr($i);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment