Say i have an array
$array
Could anyone give me an example of how to use a foreach loop and print two lists after the initial array total has been counted and divided by two, with any remainder left in the second list?
So instead of just using the foreach to create one long list it will be creating two lists? like so...
- Value 1
- Value 2
- Value 3
and then the second list will continue to print in order
- Value 4
- Value 5
- Value 6
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…