Thanks in advance for your assistance!
I would like to convert a string containing number ranges to an array. Here is an example string:
$string = "1,5,7..10,15,17..19,22";I would like to convert $string to an @array that would have the following keys and values:
(key -> value)Normally, I would go with the split() function and separate on the commas, but I cannot figure out how to get the ranges to fill in the array properly.
Many thanks!
In reply to Converting String Containing Ranges to Array by Comment
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |