maddogandnoriko Posted March 11, 2009 Share Posted March 11, 2009 I have an array with say 100 elements. I need to execute code on it for the first 50 elements and then cut them off and execute the code on the last 50. I think what I need is something like and array_shift but for 50 elements. Thank you for your help. todd Quote Link to comment Share on other sites More sharing options...
Mchl Posted March 11, 2009 Share Posted March 11, 2009 array_chunk ? array_slice ? Quote Link to comment Share on other sites More sharing options...
redarrow Posted March 11, 2009 Share Posted March 11, 2009 http://uk2.php.net/array_splice sorry array chunk easy way. Quote Link to comment Share on other sites More sharing options...
maddogandnoriko Posted March 11, 2009 Author Share Posted March 11, 2009 Thanks Guys! Any of those solutions will work, have to see what fits best. Thank you very much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.