For my current project I need an user to define a range of numbers which is stored in a database.
The following string is a possible user input:
1025-1027,1030,1032-1034
I want to process this string with php to get an array of possible numbers including the possibility to add a range of numbers with n-n²
or adding single numbers separated with n; n²
which for this example would be:
1025 1026 1027 1030 1032 1031 1034