permute

Calculates all the possible permutations (orders) of array. should not be called on huge arrays (bigger than like 10 elements.) returns an array containing each permutation.
Parameters Summary
array $array