fcqmax
asked on
How to repeat range within an array
Lets say I have an array like this:
$array[]
1.txt
2.txt
3.txt
marker start.txt
4.txt
5.txt
6.txt
7.txt
8.txt
9.txt
marker end.txt
10.txt
11.txt
12.txt
13.txt
How do I repeat the range between the markers and delete the marker rows so $array[] becomes:
1.txt
2.txt
3.txt
4.txt
5.txt
6.txt
7.txt
8.txt
9.txt
4.txt
5.txt
6.txt
7.txt
8.txt
9.txt
10.txt
11.txt
12.txt
13.txt
$array[]
1.txt
2.txt
3.txt
marker start.txt
4.txt
5.txt
6.txt
7.txt
8.txt
9.txt
marker end.txt
10.txt
11.txt
12.txt
13.txt
How do I repeat the range between the markers and delete the marker rows so $array[] becomes:
1.txt
2.txt
3.txt
4.txt
5.txt
6.txt
7.txt
8.txt
9.txt
4.txt
5.txt
6.txt
7.txt
8.txt
9.txt
10.txt
11.txt
12.txt
13.txt
ASKER
Thanks, that part is solved. But still looking for the range between the markers to be repeated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great! Working now!
Open in new window