I'm not quite sure what I'm doing wrong, but it appears I'm having myself a brain fry trying to comprehend it..
$cards = array(range(1,52));
shuffle($cards);
echo $cards[0];
I get a array to string conversion error.
I've also tried a custom function to echo dependent on the input value and that isn't working either.