Permutation

I have a problem about how to display the result of a permutation nPr
eg. if some1 key in 3P2
the screen should output
AB
AC
BA
BC
CA
CB
OR... something like this
[208 byte] By [developer-network] at [2007-11-17 14:03:28]