Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ARRAY_SLICE is too time-consuming

Status
Not open for further replies.

ruffy

Programmer
Joined
Oct 1, 2003
Messages
72
Location
US
I used "foreach" to traverse a large 2d array.
Then I needed to "array_slice" out new arrays when the requirements changed.
This kept my foreach code intact.
The thing is array_slice takes an immense amount of time, espeially when the slice is deeper into the original array.

How can I traverse a section of an array
simply by moving to the new start key, then traverse from there
till the new end key - without "array_slicing".

I'd appreciate your help and time - Meir
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top