I have a structural question.
I come from a Java background. In Java, there was a premade class called LinkedList. Essentially I want something like that.
The idea is, I have an array, example:
When I call the following snippet of code:
I want the following output:
1
2
3
4
1
2
3
So essentially I want an array type structure that goes back to its first element after its last one.
Is there a simple way with php?