RE: Re[3]: [PHP] split array in 2 halfs

2001-10-31 Thread Matthew Loff
More generally, this should work: $smallarray1=array_slice($bigarray, 0, sizeof($bigarray) / 2); $smallarray2=array_slice($bigarray, sizeof($bigarray) / 2); I haven't tested it though... -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 4:32 PM

Re: Re[3]: [PHP] split array in 2 halfs

2001-10-31 Thread Mike Frazer
Don't forget that you should clear out that memory space, especially if it's an array of arrays or an array of objects or something along those lines: unset($bigarray); Just good programming practice, that's all. I doubt it would ever be a problem on today's servers, but it's still a good idea.