I haven't tested this but I think it might work
$aryWord = explode("",$word);
now $aryWord is an array of the letters that make up $word
shuffle($aryWord);
now $aryWord is shuffled
$newWord = implode("",$aryWord);
now $newWord is your shuffled word
I think this'll be a fun little exercise so I'm off to do a little test script now.