Don't mistake permutations and combinations. http://en.wikipedia.org/wiki/Permutatio ... mbinations
@bokehman:
The problem is that if your array contains many items of which to choose three, the number of array elements in your multi-dimensional array will get too large. A workaround to this is to have a callback function which will be called every time a new subset of three is generated. In that way you won't have to keep them all in memory simultaneously, but on the other hand you have a way to call a function for each of them. See array_walk() for an inspiration if you are not familiar with the concept of callbacks.Maybe I am missing your direction on this but I was going to put them all in one multi dimensional array. What's the problem there?
You still haven't told us why you need all 3-element combinations of an array - maybe there's a totally different approach to your problem which will remove the need of this computationaly heavy stuff altogether?