- print_r: documentation ( source)
- ord: documentation ( source)
<?php
$char1 = '!';
$char2 = '/';
$start = ord($char1);
$stop = ord($char2);
$set = array();
for($i=$start; $i < $stop; ($start > $stop? $i++: $i--)){
$set[] = char($i);
}
print_r($set);