Vadimbr Posted February 3, 2012 Share Posted February 3, 2012 Hi, I need to sort variables in groups of up to 15 and put it in an array. For example: $exstract['center_tabOpBody_0'] =5 $exstract['center_tabOpBody_1'] =6 $exstract['center_tabOpBody_2'] =8 $exstract['center_tabOpBody_3'] =1 Should yield: ARRAY( [0] = center_tabOpBody_1,center_tabOpBody_2,center_tabOpBody_3 // <-----15 [1] = center_tabOpBody_0 //<----5 ) Is there some simple function do do the "efficiency" sort? Thanks, Vadim Quote Link to comment Share on other sites More sharing options...
trq Posted February 3, 2012 Share Posted February 3, 2012 Not enough detail provided I'm afraid. Quote Link to comment Share on other sites More sharing options...
Vadimbr Posted February 3, 2012 Author Share Posted February 3, 2012 Ok, Let say I have a bunch of numbers and I want to sort them in groups of up to 15. Those numbers: 1,5,8,10,8,3 Result in: 1) 5,10 2) 8,1,3 3)8 Quote Link to comment Share on other sites More sharing options...
silkfire Posted February 3, 2012 Share Posted February 3, 2012 What is your criteria for sorting? It doesn't make sense. Quote Link to comment Share on other sites More sharing options...
Vadimbr Posted February 3, 2012 Author Share Posted February 3, 2012 Ok, I try to explain what I'm doing to make it more clear. I'm extracting data from a web site. The data I want arranged under "center_tabOpBody_XX" tags and each tag contains up to 15 elements. Meaning: center_tabOpBody_0 contains 10 elements center_tabOpBody_1 contains 3 elements and so on... I can get only 15 elements per one ip before it get black listed so I need to arrange "center_tabOpBody_XX" in groups up to 15 elements total per group and then parse those groups individually, one proxy per group. 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.