Get ALL possible results from mixing array
<p>I've looked everywhere for this online, but couldn't completely find it. (my PHP and math skills are letting my down for this one...)
I have an array containing for example three strings (could also be more!) (for example: "a", "b", "c"). Now I want to make a function which returns ALL possibilities. I looked everywhere and found some nice functions who shifted the array in all possibles ways, but they didn't remove a value one by one. So they had:</p>

<blockquote>
  <p>abc acb bac bca cab cba</p>
</blockquote>

<p>Which is fine, but I need a function that takes it to the next level:</p>

<blockquote>
  <p>abc acb bac bca cab cba ac ca ab ba bc ba a b c</p>
</blockquote>

<p>and this regardeless of how many values (let's say max 10).
I've been struggling with this the entire evening, can someone put me out of my misery and solve this riddle for me please? Or give some advice.
Thanks</p>
