Possible Duplicate:
How to generate all permutations of a string in PHP?
I want to make a script in php that will take this input:
12a
And output a result like so:
1, 2, a, 12, 1a, 21, 2a, a1, a2, 12a, 1a2, 21a, 2a1.
I did some research but I cannot find any script that will do this.