http://qs1969.pair.com?node_id=90879


in reply to Humanized lists of numbers

After some thought, I'd like to modify the if to this:

if (($array[$x] + 1 == $array[$x+1]) && ($array[$x] + 2 == $array[$x+2])) {

That way you don't end up with display-length sub-lists like "1-2, 4-5" in lists. Again, I'm sure there's a better way, but...