Skip to content

Instantly share code, notes, and snippets.

@Kcko
Created June 12, 2015 11:55
Show Gist options
  • Save Kcko/dfb7fdc92cca1b10c207 to your computer and use it in GitHub Desktop.
Save Kcko/dfb7fdc92cca1b10c207 to your computer and use it in GitHub Desktop.
<?php
function fillMyArr($from, $to)
{
for ($i = $from; $i <= $to; $i++)
$arr[$i] = $i;
return $arr;
}
function toHex($n)
{
$hex = strtoupper(dechex($n));
$hex = str_pad($hex, 4, '0', STR_PAD_LEFT);
return $hex;
}
$arr = fillMyArr(33, 45)
+ fillMyArr(46, 57)
+ fillMyArr(65, 81)
+ fillMyArr(82, 93)
+ fillMyArr(97, 112)
+ fillMyArr(113, 122)
+ fillMyArr(162, 168)
+ fillMyArr(9724, 9724);
foreach ($arr as $n)
{
echo $n . ' ' . '"\e' . toHex($n) . '",<br />';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment