$in = 500;

$after = array('0','1','2','3','4','5'..........'z');
$a = floor($in /36);
$b = $in % 36;

$out = $after[$a].$after[$b];

echo $out;